[Tutorial] setskin
#2

There are several problems with the command above:

- You don't check whether the player (pID) is connected.
- You don't check whether the skin (sID) is a valid one and some invalid skins can crash the client. Valid skins are 0-73 and 75-299.
- You don't define COLOR_RED so it will give undefined symbol.
- SCM is defined as SendClientMessage. That is fine but the line:
pawn Код:
SCM(playerid, COLOR_RED,"Admin %s has set your skin to %i.", name, sID);
is not correct. You need format a string first and then send the formatted text.
Reply


Messages In This Thread
setskin - by MatriXgaMer - 09.01.2014, 12:29
Re: setskin - by Konstantinos - 09.01.2014, 12:49
Re: setskin - by MatriXgaMer - 09.01.2014, 12:52
Re: setskin - by Vince - 09.01.2014, 13:10
Re: setskin - by newbie scripter - 09.01.2014, 15:16
Respuesta: setskin - by Swedky - 09.01.2014, 15:21
Re: Respuesta: setskin - by Konstantinos - 09.01.2014, 15:31

Forum Jump:


Users browsing this thread: 3 Guest(s)