04.11.2011, 16:49
Hey im usind zcmd and sscanf and want to make a /a command that only admins can use, and everyone in the server can see it how can i make it?
Im scripting my Admin cmds like this:
Im scripting my Admin cmds like this:
pawn Код:
CMD:slap(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new
pID;
if(sscanf(params, "u", pID))
{
return 0;
} else {
if(!IsPlayerConnected(pID))
{
SendMessage(playerid, 0xFF000FFF, "s", "That player is not connected or not signed in!");
} else {
SendMessage(pID, 0xFF000FFF, "sss", "Administrator ", GetName(playerid), " has killed you.");
SendMessageToAll(0xFF000FFF, "ss", GetName(pID), " has been Admin killed by Administrator", GetName(playerid));
SetPlayerHealth(playerid,0);
}
return 1;
}
}
return 0;
}