28.04.2013, 18:07
First off all, your code will not work at all, you're deactivating it regardless of the player being admin or not, and its not using sscanf properly.
Try something like this;
Try looking into some SSCANF usage guides and perhaps (better) identation will be a nice thing to learn at the get go too.
Try something like this;
pawn Код:
CMD:devip(playerid,cmdtext[])
{
if(GetAdminLevel(playerid) >= 4)
{
new player;
if(sscanf(cmdtext,"u",player)) return SendClientMessage(playerid, -1, "/devip [player id / name]");
SendClientMessage(playerid, COLOR_WHITE, "Deactivation successfull.");
Deactivevip(player);
}
else return SendClientMessage(playerid, COLOR_WHITE, "You're not an admin.");
return 1;
}