C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(228) : error 035: argument type mismatch (argument 1)
C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(230) : error 035: argument type mismatch (argument 1)
C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(232) : error 035: argument type mismatch (argument 1)
C:\Users\ъеош\Desktop\Server\gamemodes\Test.pwn(235) : error 035: argument type mismatch (argument 1)
CMD:slap(playerid, params[])
{
new id[50];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[Error] You are not authorised to use this command!");
else if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage] /slap [User ID]");
else
{
new Float:x,
Float:y,
Float:z,
name[MAX_PLAYER_NAME+1],
name2[MAX_PLAYER_NAME+1],
message[84];
GetPlayerPos(id, x, y, z); // Error one.
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, name2, sizeof(name2)); // Error two.
format(message, sizeof(message), "[Info] You were slapped by the administrator %s.", name);
SendClientMessage(id, COLOR_WHITE, message); // Error three.
format(message, sizeof(message), "[SUCCESS] You just slapped %s.", name2);
SendClientMessage(playerid, COLOR_WHITE, message);
SetPlayerPos(id, x, y, z + 5); // Error four.
}
return 1;
}
new id;
new id[50];
You should use:
pawn Код:
pawn Код:
|
Thanks it now perfectly works
Would you mind explaining me how though? I am just curious why I can't do [] with an ID. |