MaRcell Posted March 20, 2015 Share Posted March 20, 2015 Alguem teria aquele script do play /ss para trocar de skin sem ter o play ligado ou se nao tiver me falar as funçoes nescessarias para criar o script fico grato. Link to comment
xeon17 Posted March 20, 2015 Share Posted March 20, 2015 Você pode encontrar o código em fr_client.lua No entanto, para criar isto não é difícil. tonumber setElementModel addCommandHandler Link to comment
MaRcell Posted March 20, 2015 Author Share Posted March 20, 2015 Desse fr- client o codigo nao pegou. Link to comment
MaRcell Posted March 20, 2015 Author Share Posted March 20, 2015 Desse fr- client o codigo nao pegou. Vou criar o meu Link to comment
manawydan Posted March 25, 2015 Share Posted March 25, 2015 to meio enferrujado mais ve se da certo: function SetSkin(player,cmd,skinNumber) if(skinNumber and tonumber(skinNumber))then setElementModel(player,tonumber(skinNumber)) outputChatBox("Voce mudou de skin",player) else outputChatBox("Use /ss e o numero do skin",player) end end addCommandHandler("ss",SetSkin) Link to comment
n3wage Posted March 25, 2015 Share Posted March 25, 2015 to meio enferrujado mais ve se da certo: function SetSkin(player,cmd,skinNumber) if(skinNumber and tonumber(skinNumber))then setElementModel(player,tonumber(skinNumber)) outputChatBox("Voce mudou de skin",player) else outputChatBox("Use /ss e o numero do skin",player) end end addCommandHandler("ss",SetSkin) só faltou verificar se a skin é valida. function SetSkin ( thePlayer, cmd, id ) if ( id and tonumber ( id ) ) then id = tonumber(id); idValido = false; for _, v in ipairs ( getValidPedModels () ) do if ( v == id ) then idValido = true; break; end end return idValido and setElementModel ( thePlayer, id ) or outputChatBox ( "ID Invalido.", thePlayer, 255, 0, 0 ); else outputChatBox ( "Use: /"..cmd.." [sKINID]", thePlayer, 255, 0, 0 ); end end addCommandHandler ( "ss", SetSkin, false, false ); (script parecido com o exemplo da função getValidPedModels() ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now