novo Posted December 14, 2011 Posted December 14, 2011 Hi all. I want make a command for setMaxPlayers Here's my code: function ( playerSource, commandName ) numbermax = getMaxPlayers () if not col2 then col2 = numbermax end -- Set the vehicle's color setMaxPlayers(numbermax) end end end addCommandHandler ( "setmax", ) My command is /setmax but i don't know to do /setmax option. I don't know to fix that code. PLZ HELP ME <3
12p Posted December 14, 2011 Posted December 14, 2011 Clickea la función, porfavor. addCommandHandler Qué no entiendes?
novo Posted December 14, 2011 Author Posted December 14, 2011 Haber, no pedi ayuda aquí para que tu vayas y me digas que debo aprender. Vine aqui, porque NO ENTIENDO ! HABER ENTERATE.
TAPL Posted December 14, 2011 Posted December 14, 2011 function (player,cmd,numbermax) if not numbermax then return end setMaxPlayers(numbermax) end addCommandHandler ("setmax", )
12p Posted December 14, 2011 Posted December 14, 2011 Qué no entiendes? No te pongas rudo conmigo, que yo trato de ayudarte DE OTRA MANERA. TAPL, will he learn ANYTHING from that code? Did you make any comment for him? (yet another user that will copy + paste, say thanks, come back asking for help, and the cycle repeats)
novo Posted December 14, 2011 Author Posted December 14, 2011 (edited) . Edited December 14, 2011 by Guest
12p Posted December 14, 2011 Posted December 14, 2011 en vez de setMaxPlayers ( numbermax ) pone setMaxPlayers ( tonumber (numbermax) ) Cuando dices a setMaxPlayers que use "numbermax", le dices que ocupe UN TEXTO para la cantidad de jugadores, lo cual no tiene sentido. tonumber convierte el texto a un número y así lo hace funcionar (BTW can anyone pls move this to Spanish subforum, ty)
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