21.01.2013, 00:32
Ok, so this command Works Good, no problem with it but i want to add something to it which i tired and it didnt work
Command is /jail [ID]
I want to add "/jail [ID] [reason]" can you please help me on this?
Command is /jail [ID]
pawn Код:
COMMAND:jail(playerid, params[])
{
if(PlayerInfo[playerid][PlayerAdmin] <= JAIL_LEVEL) return SendClientMessage(playerid,COLOR_WHITE, "SERVER: Unknown command.");
new targetid;
if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_WHITE, ""WHITE"Usage: "GREEN"/jail "WHITE"[playerid]");
new ID = targetid;new string[128];
if(IsPlayerConnected(ID))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"You have been Admin jailed by "SININE"%s",name);
SendClientMessage(ID,COLOR_SININE, string);
new rand = random(sizeof(RandomJail));
SetPlayerPos(ID, RandomJail[rand][0], RandomJail[rand][1], RandomJail[rand][2]);
ResetPlayerWeapons(ID);
SetPlayerInterior(ID, 3);
}
return 1;
}