30.12.2011, 10:09
Hello, i'm trying to make a command where i'm able to give a skin to people in a radius.
I currently have this but it doesen't work. Could anyone tell me what i'm doing wrong.
Warning:
LINE: 58482
I currently have this but it doesen't work. Could anyone tell me what i'm doing wrong.
pawn Код:
CMD:setskins(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
new string[128], radius, skin;
if(sscanf(params, "dd", skin, radius))
{
SendClientMessageEx(playerid, COLOR_GRAD6, "[Syntax]: /setskins [skin] [radius]");
return 1;
}
if(!IsInvalidSkin(skin))
{
SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!");
return 1;
}
if(radius < 1 || radius > 50)
{
SendClientMessageEx(playerid, COLOR_WHITE, "Radius must be higher than 0 and lower than 51!");
return 1;
}
SetPlayerSkin(playerid, skin, radius);
format(string, sizeof(string), "You have given everyone skin %d in %d radius", skin, radius);
SendClientMessageEx(playerid, COLOR_LIGHTGREEN, string);
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
Warning:
pawn Код:
C:\Users\Bart\Downloads\0.3D\0.3D\gamemodes\syrp.pwn(58482) : warning 202: number of arguments does not match definition
pawn Код:
SetPlayerSkin(playerid, skin, radius);