Arrest command
#6

In my script i made a PlayerInfo [playerid][pJailTime] in enum.
On your sscanf add:

Quote:

new time;
if(sscanf(params, "ud", ID, time)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /ar [ID] [minutes]");

then on your command /arrest:
Quote:

PlayerInfo[ID][pJailTime] = time * 60;

for counting down the jailtime i used y_timers

Quote:

Timer:JailTimer[1000]() // The tickrate 1 second
{
foreach(Player, i)
{
if(PlayerInfo[i][pJailTime] > 0)
{
PlayerInfo[i][pJailTime] --;
}
}
}

then set when pJailTime == 0 so set a spawn point.
I just gave the idea.
Reply


Messages In This Thread
Arrest command - by vassilis - 05.04.2014, 13:03
Re: Arrest command - by thomaswilliams - 05.04.2014, 13:08
Re: Arrest command - by thomaswilliams - 05.04.2014, 13:10
Re: Arrest command - by vassilis - 05.04.2014, 13:12
Re: Arrest command - by vassilis - 05.04.2014, 15:41
Re: Arrest command - by Lidor124 - 05.04.2014, 15:55
Re: Arrest command - by vassilis - 06.04.2014, 08:15
Re: Arrest command - by vassilis - 06.04.2014, 15:04

Forum Jump:


Users browsing this thread: 2 Guest(s)