SA-MP Forums Archive
Arrest command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Arrest command (/showthread.php?tid=504681)



Arrest command - vassilis - 05.04.2014

fixed


Re: Arrest command - thomaswilliams - 05.04.2014

I may be able to supply you with a /arrest that I made with the timer and everything?


Re: Arrest command - thomaswilliams - 05.04.2014

Make a time variable


Re: Arrest command - vassilis - 05.04.2014

Quote:
Originally Posted by thomaswilliams
Посмотреть сообщение
I may be able to supply you with a /arrest that I made with the timer and everything?
If you don't mind giving out to me then i would be glad
EDIT: Any help


Re: Arrest command - vassilis - 05.04.2014

bump sorry any idea?


Re: Arrest command - Lidor124 - 05.04.2014

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.


Re: Arrest command - vassilis - 06.04.2014

Quote:
Originally Posted by Lidor124
Посмотреть сообщение
In my script i made a PlayerInfo [playerid][pJailTime] in enum.
On your sscanf add:



then on your command /arrest:


for counting down the jailtime i used y_timers



then set when pJailTime == 0 so set a spawn point.
I just gave the idea.
giving the ability to cops to set their own time for jail it would be abusive... they could put long time... for civilians
Uh other possible way of how i could put the timer for jail?


Re: Arrest command - vassilis - 06.04.2014

Bump help please