13.03.2011, 14:48
Hey guys, one more time i need help... I made my jail cmd but now i don't know how to set a timer that unjail after 3 minuts!
Here's the code, Thanks!
THANKS
Here's the code, Thanks!
pawn Код:
COMMAND:cjail(playerid, params[])
{
if(GetPlayerColor(playerid) == 0x0259EAAA)
{
new toplayer;
if(!sscanf(params, "ui", toplayer))
{
if(IsPlayerConnected(toplayer))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
if(IsPlayerInRangeOfPoint(toplayer, 20.0, X,Y,Z))
{
new string[64];
new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(toplayer, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "Cop %s Has UnStun You", name);
SendClientMessage(playerid, 0x0259EAAA, string);
format(string, sizeof(string), "You Has UnStun %s", PlayerName);
SendClientMessage(playerid, 0x0259EAAA, string);
SetPlayerPos(toplayer, 264.6288,77.5742,1001.0391);
return 1;
}
else return SendClientMessage(playerid, 0x0259EAAA, "You Are Not Near The Player.");
}
else return SendClientMessage(playerid, 0x0259EAAA, "Player Is Not Connected.");
}
else return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /cjail [PlayerId/PartOfName]");
}
else return SendClientMessage(playerid, 0x0259, "You Are Not Cop!");
}