This code has a problem, after the time is over it will teleport everyone on the server instead of the actual arrested player.
Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
Random script.
7 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
This code has a problem, after the time is over it will teleport everyone on the server instead of the actual arrested player.
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
function jailtime(id) timer("6000","jailover",id) end function jailover(id) parse("setpos "..id.." 843 173") rp_killer[id]=false end
also for all your setpos you should maybe use existing script like the safe-zone, you would gain in readability and make your script less dependant to your map.
http://www.unrealsoftware.de/files_show.php?file=12950
edited 3×, last 08.10.15 01:45:13 pm
Why settle for if-else loop when you have table? I've fixed it and you may take mine as an example.
![user](img/i_friend.png)
@
![user](img/i_friend.png)
1
2
3
4
2
3
4
function jailover(id) rp_killer[id] = false parse("setpos "..id.." 843 173") end
rp_killer can be true but not back to false after arrest...
![user](img/i_friend.png)
I can look more closely if you post your entire script indented
id = tonumber(id)
![user](img/i_friend.png)
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
function jailtime(id) id = tonumber(id) timer("6000","jailover",id) id = tonumber(id) end function jailover(id) id = tonumber(id) rp_killer[id] = false parse("setpos "..id.." 843 173") id = tonumber(id) end
So I used this code and around after 10 times his (bot) rp_killer was true and I arrested him, his rp_killer became false.
How about we make something related to walkover and when he is walking on either one of the tiles in the cell his rp_killer will become false?
Edit: Fixed.
![user](img/i_friend.png)
edited 1×, last 08.10.15 11:57:37 pm
Admin/mod comment
![Rules](img/v_illegal.png)
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)