14.03.2012, 14:47
Quote:
forward timer_ar1(playerid); |
pawn Код:
CMD:ar1(playerid, params[])
{
new id;
if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 288)
if (sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_LIGHTBLUE, "Usage: /ar1 [ID]");
if(GetDistanceBetweenPlayers(playerid,id)> 2)return SendClientMessage(playerid,COLOR_RED,"[INFO]You are to far from that player");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "[INFO]Player not found");
else
{
SetPlayerPos(id, 226.69999694824,108.5,998.59997558594);
SetPlayerVirtualWorld(id, -1);
SetPlayerInterior(id, 10);
GivePlayerMoney(id, -1500);
ResetPlayerWeapons(id);
SendClientMessage(id, COLOR_GOLD, "[INFO]You have been Arrested, Your Sentence is 60 Seconds.");
GivePlayerMoney(playerid, 500);
SendClientMessage(playerid, COLOR_GOLD, "[INFO]Player Arrested succesfully. (Arrest type: 1)");
SetTimerEx("timer_ar1",60000,false,"i",playerid); //set your player normal spawn pos here after arrest
SetPlayerColor(id,orange);
TogglePlayerControllable(id, 1);
}
return 1;
}
pawn Код:
public timer_ar1(playerid)
{
SetPlayerColor(playerid, COLOR_GREY);
SetPlayerPos(playerid, -88.0029, 1222.8109, 19.7422);
SetPlayerInterior(playerid, 0);
TogglePlayerControllable(playerid,1);
SetPlayerVirtualWorld(playerid, 0);
}