11.10.2011, 15:59
No problem.
First:
I really think, that while you are using if(sscanf(..)) condition, you've to make action below it, to be sure, that it WILL work.
Instead of "Error msg." you can write either "Learn to use command, foul" or "Error. Try again. USAGE: /skin [0-5]
Why 0-5? Look at the switch function.
Oh, forget about command header (damn).
Instead
give
if command(skin, playerid, params[]) works for you, don't edit it.
Second modification: I do not see sense, of using "if(Player[playerid][Group] == 4" in each 'case' in 'switch' function, if 'switch' function will only continue, if this condition is done
First:
pawn Код:
if(sscanf(params,"d",text))
{
SendClientMessage(playerid,COLOR,"Error msg.");
return 1;
}
Instead of "Error msg." you can write either "Learn to use command, foul" or "Error. Try again. USAGE: /skin [0-5]
Why 0-5? Look at the switch function.
Oh, forget about command header (damn).
Instead
pawn Код:
command(skin, playerid, params[])
pawn Код:
command:skin(playerid, params[])
Second modification: I do not see sense, of using "if(Player[playerid][Group] == 4" in each 'case' in 'switch' function, if 'switch' function will only continue, if this condition is done
pawn Код:
if(Player[playerid][Group] == 4)
{
switch(text)
...