Jump to content

Semplice Domanda e richiesta


Recommended Posts

Oggi volevo creare un gruppo nell'acl.xml per provare un autoteams che ho scaricato, però sono perplesso su una cosa.

Il codice è così? o.O

    <group name="Staff"> 
        <acl name="Staff"></acl> 
        <object name="user.Chuck"></object> 
    </group> 

Qualcuno di voi ha un autoteams dove non c'è bisogno di mettere la tag nel codice lua?

Inoltre qualcuno ha lo script che in basso a sinistra ti mostra il nome della mappa e gli fps? grazie.

Link to comment

aggiungi questo :

  
-- il gruppo 
  
  <group name="Staff"> 
        <acl name="Staff"></acl> 
        <object name="resource.*"></object> 
   -- qui aggiungi i membri 
    </group> 
  
-- ed ora l ACL dei permessi 
  
  <acl name="Staff"> 
-- qui puoi aggiungere i permessi ad esempio vedi sotto : il gruppo Staff ha l'accesso al comando kick 
<right name="command.kick" access="true"></right> 
    </acl> 
  

Per l fps usa questo https://community.multitheftauto.com/ind ... tails&id=7

Link to comment

Grazie, potresti dirmi come posso modificare il font del label FPS con quello uasto per il nome della mappa e se si può togliere Max FPS: 52?

In gioco si vede FPS: XX Max FPS: XX. Io vorrei rimuovere MaxFPS, e cambiare font.

FPS.lua

FPSLimit = 52 
FPSMax = 1 
  
function onClientResourceStart ( resource ) 
    if ( guiFPSLabel == nil ) then 
        FPSLimit = 255 / FPSLimit 
        guiFPSLabel = guiCreateLabel ( 0.03, 0.97, 0.1, 0.1, "FPS: 0", true ) 
        FPSCalc = 0 
        FPSTime = getTickCount() + 1000 
        addEventHandler ( "onClientRender", getRootElement (), onClientRender ) 
    end 
end 
addEventHandler ( "onClientResourceStart", getRootElement (), onClientResourceStart ) 
  
function onClientRender ( ) 
    if ( getTickCount() < FPSTime ) then 
        FPSCalc = FPSCalc + 1 
    else 
        if ( FPSCalc > FPSMax ) then FPSLimit = 255 / FPSCalc FPSMax = FPSCalc end 
        guiSetText ( guiFPSLabel, "FPS: "..FPSCalc.." Max: "..FPSMax ) 
        guiLabelSetColor ( guiFPSLabel, 255 - math.ceil ( FPSCalc * FPSLimit ), math.ceil ( FPSCalc * FPSLimit ), 0 ) 
        FPSCalc = 0 
        FPSTime = getTickCount() + 1000 
    end 
end 

Link to comment

Certo Certosino :mrgreen:

Mettiamo caso che il font in questione si chiami mioFont.ttf (non usare font complicati o che pesino troppo altrimenti lagga)

  
FPSLimit = 52 
FPSMax = 1 
ilFont = guiCreateFont( "mioFont.ttf", 10) -- 10 è il size,prova 10 se è piccolo il testo fai 15 se è grande fai 5 etc.. 
  
function onClientResourceStart ( resource ) 
    if ( guiFPSLabel == nil ) then 
        FPSLimit = 255 / FPSLimit 
        guiFPSLabel = guiCreateLabel ( 0.03, 0.97, 0.1, 0.1, "FPS: 0", true ) 
        guiSetFont(  guiFPSLabel, ilFont ) -- come puoi vedere abbiamo settato il font alla label 
        FPSCalc = 0 
        FPSTime = getTickCount() + 1000 
        addEventHandler ( "onClientRender", getRootElement (), onClientRender ) 
    end 
end 
addEventHandler ( "onClientResourceStart", getRootElement (), onClientResourceStart ) 
  
function onClientRender ( ) 
    if ( getTickCount() < FPSTime ) then 
        FPSCalc = FPSCalc + 1 
    else 
        if ( FPSCalc > FPSMax ) then FPSLimit = 255 / FPSCalc FPSMax = FPSCalc end 
        guiSetText ( guiFPSLabel, "FPS: "..FPSCalc..) -- e qui abbiamo rimosso il max fps 
        guiLabelSetColor ( guiFPSLabel, 255 - math.ceil ( FPSCalc * FPSLimit ), math.ceil ( FPSCalc * FPSLimit ), 0 ) 
        FPSCalc = 0 
        FPSTime = getTickCount() + 1000 
    end 
end 
  

Purtroppo non posso testare nulla,testa e fammi sapere.

Link to comment

Se invece vuoi usare un font defaul di mta e ancora più semplice,a occhio credo che il font del nome della mappa è default-bold-small

quindi :

  
-- sostituisci  
 guiSetFont(  guiFPSLabel, ilFont ) 
  
con 
  
 guiSetFont(  guiFPSLabel,  "default-bold-small") -- force e meglio crearlo il font perche puoi gestire la grandezza 
  

Link to comment

<meta> 
    <info author='Tu' version='La Versione' name='nome script' description='descrizione' type='tipo (script)' /> 
    <script src='file.lua' type='client' /> 
    <file src="miofront.ttf"/> 
</meta> 

Naturalmente chiamarai "file.lua" lo script.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...