15.01.2012, 21:02
Hello everybody! I made this /arrest cmd where cops can arrest people, they will be teleported into jail. Now how do I set it that after a custom amount of time the player will be teleported to infront of the lspd?
With custom ammount of time I mean like /arrest [playername/ID] [time in minuts]
Any idea?
Code so far:
With custom ammount of time I mean like /arrest [playername/ID] [time in minuts]
Any idea?
Code so far:
Код:
CMD:arrest(playerid, params[]) { if(PlayerInfo[playerid][Fmember] == 1) { new toplayer; new time; if(!sscanf(params, "uis", toplayer, time)) { if(IsPlayerConnected(toplayer)) { if(IsPlayerInRangeOfPoint(toplayer, 20.0, 221.9771, 121.3747, 999.0156)) { if(IsPlayerInRangeOfPoint(playerid, 20.0, 221.9771, 121.3747, 999.0156)) { new string[64]; new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME], time[256]; GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(toplayer, PlayerName, sizeof(PlayerName)); format(string, sizeof(string), "[LAW ENFORCEMENT] Police Officer %s has just arrested %s for % minutes!", name, PlayerName, time); SendClientMessage(playerid, COLOR_NEUTRALBLUE, string); format(string, sizeof(string), "You Jailed %s", PlayerName); SendClientMessage(playerid, 0x2641FEAA, string); SetPlayerPos(toplayer, 219.3402, 110.0057, 999.0156); SetPlayerInterior(toplayer, 10); jailed[toplayer] = 1; return 1; } else return SendClientMessage(playerid, 0x2641FEAA, "You are not near the jail!"); } else return SendClientMessage(playerid, 0x2641FEAA, "No suspect near the jail!"); } else return SendClientMessage(playerid, 0x2641FEAA, "Player Is Not Connected."); } else return SendClientMessage(playerid, 0x2641FEAA, "USAGE: /arrest [Playername]"); } else return SendClientMessage(playerid, COLOR_RED, "You are not a cop!"); }