13.12.2011, 22:28
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /jail <playerid/partofname>");
Please look at this link..
Please look at this link..
pawn Код:
CMD:jail(playerid,params[])
{
new id;
if(PlayerInfo[playerid][pAdminLevel] < 4) return SendClientMessage(playerid,COLOR_GREY,"You are not allowed to use this command!");
{
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "[CMD] / [PlayerID/PartOfName]");
new gName[MAX_PLAYER_NAME],string[128];
GetPlayerName(id,gName,sizeof gName);
format(string,sizeof string,"You jailed %s",gName);
SendClientMessage(playerid,0x00ff00ff,string);
SendClientMessage(id,0xFF0000FF,"You have been jailed by admin.");
SetPlayerInterior(id,0);
SetPlayerPos(id,-9.6939,2336.7288,24.3034);
ResetPlayerWeapons(id);
}
return 1;
}