Need help with this Command[+rep]
#5

pawn Код:
COMMAND:jail(playerid, params[])
{
if(PlayerInfo[playerid][PlayerAdmin] <= JAIL_LEVEL) return SendClientMessage(playerid,COLOR_WHITE, "SERVER: Unknown command.");
new targetid;
new reason[25];
if(sscanf(params,"us[25]", targetid,reason)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /jail [playerid] [reason]");
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 %s for %s",name, reason);
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;
}
else return SendClientMessage(playerid,COLOR_SININE, "player is not connected.");

}
Reply


Messages In This Thread
Need help with this Command[+rep] - by ZBits - 21.01.2013, 00:32
Re: Need help with this Command[+rep] - by Dragonborn - 21.01.2013, 00:38
Re: Need help with this Command[+rep] - by ZBits - 21.01.2013, 00:40
Re: Need help with this Command[+rep] - by LarzI - 21.01.2013, 00:55
Re: Need help with this Command[+rep] - by Jewell - 21.01.2013, 01:24
Re: Need help with this Command[+rep] - by batonsa - 21.01.2013, 08:13

Forum Jump:


Users browsing this thread: 1 Guest(s)