Jailtime
#1

Код:
CMD:jail(playerid, params[])
{
    new id, time, reason[24];
    if(pAdmin[playerid] < 1) return SendClientMessage(playerid, 0xCD0000FF, "Invalid command. Please use {FFF8CF}/cmds {CD0000}to list all available commands.");
    if(sscanf(params, "uis", id, time, reason)) return SendClientMessage(playerid, -1, "{0008F7}USAGE: {FFFFFF}/JAIL ID MINUTES REASON");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player is not connected");
    else
    {
        RemovePlayerFromVehicle(id);
	new PName[64];
	GetPlayerName(id, PName, sizeof(PName));
	new string[256], name[24], str[99], st[99];
	GetPlayerName(playerid, name, sizeof(name));
	format(string,sizeof(string),"{0008F7}[Administration]: {FF0095}%s {C90076}have used {FF0095}JAIL {C90076}on {FF0095}%s", name, PName);
	SendToAdmins(-1, string);
	format(str,sizeof(str),"{74C6D6}Administrator %s have jailed %s for %d Minutes",name,PName,time);
	SendClientMessageToAll(-1, str);
	format(st,sizeof(st),"{74C6D6}Reason: {FF0000}''%s''",reason);
	SendClientMessageToAll(-1, st);
	SetPlayerPos(id, 264.8763,81.9862,1001.0390);
	SetPlayerInterior(id, 6);
	Jailed[id] = 1;
	new jailtime = time *= 60000;
	SetTimer("SpawnPlayer(id)", jailtime, false);
    }
	return 1;
}
This my code
When i jail ingame, player doesn't get spawned when jailtime end
Reply


Messages In This Thread
Jailtime - by Shinja - 26.06.2016, 02:19
Re: Jailtime - by Sew_Sumi - 26.06.2016, 02:57
Re: Jailtime - by Shinja - 26.06.2016, 04:03
Re: Jailtime - by Sjn - 26.06.2016, 04:40
Re: Jailtime - by Sew_Sumi - 26.06.2016, 06:10
Re: Jailtime - by Sjn - 26.06.2016, 06:27

Forum Jump:


Users browsing this thread: 1 Guest(s)