This code has a problem, after the time is over it will teleport everyone on the server instead of the actual arrested player.
Forum
CS2D Scripts Random script.Random script.
7 replies 1
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.
@ tontonEd: My problem is with this code:
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...
I can look more closely if you post your entire script indented
id = tonumber(id)
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. TopNotch helped me trough Skype.
edited 1×, last 08.10.15 11:57:37 pm
Admin/mod comment
§2.4 - Use tags sparingly and only when they add value 1