Jump to content

Comando para team?


Recommended Posts

Posted
function createTeam(source, command, tName, r, g, b) 
createTeam(tName, r, g , b) 
end 
addCommandHandler("team",createTeam) 

Ejemplo /team eldelahoz 255 0 0

Nose si esta 100% bien.

Si esta bien nomas ponele unas restricciones de admin y listo

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted
function createTeam(source, command, tName, r, g, b) 
createTeam(tName, r, g , b) 
end 
addCommandHandler("team",createTeam) 

Ejemplo /team eldelahoz 255 0 0

Nose si esta 100% bien.

Si esta bien nomas ponele unas restricciones de admin y listo

Si llamas a una función como una ya existente y utilizas la ya existente dentro de la creada, ¿No habría algún error?

Developer @ MYVAL

Posted

Si, le dara "infinite running script".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
function createTeam(source, command, tName, r, g, b) 
createTeam(tName, r, g , b) 
end 
addCommandHandler("team",createTeam) 

Ejemplo /team eldelahoz 255 0 0

Nose si esta 100% bien.

Si esta bien nomas ponele unas restricciones de admin y listo

Si llamas a una función como una ya existente y utilizas la ya existente dentro de la creada, ¿No habría algún error?

Despues de que postie me di cuenta que llame al evento de la misma manera. Sabia de posibles errores pero no exactamente porq. Gracias por la acotacion

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

No te preocupes a todos nos pasa de vez en cuando.

@eldelahoz te dejo un comando que te servira:

addCommandHandler( "team",  
    function ( source, _, tName, r, g, b ) 
        if tName and not getTeamFromName(tName ) then 
            if r and g and b then 
                createTeam( tName, tonumber( r ), tonumber( g ), tonumber( b ) ) 
            else 
                createTeam( tName ) 
            end 
        end 
    end 
) 

Developer @ MYVAL

  • Recently Browsing   0 members

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