Forum

> > CS2D > Scripts > Jail Weapon {[Five-Seven]}
Forums overviewCS2D overview Scripts overviewLog in to reply

English Jail Weapon {[Five-Seven]}

16 replies
To the start Previous 1 Next To the start

old Jail Weapon {[Five-Seven]}

Mora
User Playing CS2D

Quote
Hello
Please help me with (Jail weapon)
i made this script,but is not full:
i need help please
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
polices = {114940}

addhook("say","_say")

function _say(id,message)
     for _, usgn in ipairs(polices) do
          if player(id,'usgn')==usgn then
               msg("©000000255"..player(id,"name").." (Police): "..message)
               return 1
          end
     end
end

addhook("attack","_pol")
function _pol(id)
local wpn = (id,"weapontype)
for _, usgn in ipairs(polices) do
        if wpn == 6 then
parse("spawnplayer ... and  nothing
I need help with this
if players (police) attack others players with Five-seven then players spawn in position(1550,1400) and arrest in 10 sec
and 
msg2("©255255000You Has Been Arrested in 10 sec! Dont Break Rules")

i need help with Attack. if players who have usgn in polices list then when is fire of this weapon(five-seven) other player is arrest in 10 sec and if he is dead then spawn in this jail.When time is UP then this player normal spawn
And please!-sorry for my very bad English
Thanks you!

old Re: Jail Weapon {[Five-Seven]}

Rainoth
Moderator Off Offline

Quote
The Code >


I don't know if it will work. Try it out. Pretty sure I did everything correctly.
edited 1×, last 13.08.13 04:46:24 pm

old Re: Jail Weapon {[Five-Seven]}

Mora
User Playing CS2D

Quote
I am sure that it works! Because of you I greatly help! And all that you are doing works.
The more you do it best.
Are you really a very good person.
Thank you very much @user Rainoth:
EDIT:
LUA ERROR: sys/lua/jail.lua:29: bad argument #1 to 'player' (number expected, got nil)

old Re: Jail Weapon {[Five-Seven]}

nobilit
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
polices = {114940}

addhook("say","_say")

function _say(id,message)
     for _, usgn in ipairs(polices) do
          if player(id,'usgn')==usgn then
               msg("©000000255"..player(id,"name").." (Police): "..message)
               return 1
          end
     end
end

addhook("attack","_pol")
function _pol(id)
local wpn = (id,"weapontype)
for _, usgn in ipairs(polices) do
        if wpn == 2 then
parse("spawnplayer ... and  nothing
I need help with this
if players (police) attack others players with Five-seven then players spawn in position(1550,1400) and arrest in 10 sec
and 
msg2("©255255000You Has Been Arrested in 10 sec! Dont Break Rules")

√ i fixed it

old Re: Jail Weapon {[Five-Seven]}

Rainoth
Moderator Off Offline

Quote
The Code >


Fixed. Tested. Working. It was my mistake because I made myself an argument "s" but used "sour" that I'm used to. Sorry : )

old Re: Jail Weapon {[Five-Seven]}

Mora
User Playing CS2D

Quote
Sorry but:
When i hit player with F-S then nothing
When i kill bot with F-S and he re-spawn and he after 10 sec has TP in Jail
and if he spawn in jail (when i kill him) and i say /bot_kill then he spawn normal(no in jail)

old Re: Jail Weapon {[Five-Seven]}

Rainoth
Moderator Off Offline

Quote
The script works this way :
• When you hit a player, if you are using 5-7 and you're "polices" it will teleport that player to a location after 10 seconds and write him a message that he's arrested.
• if after 10 seconds he's dead, he'll be spawned in Jail.

I understood that much from your post. It appears you want player to always be in Jail, or what ?

old Re: Jail Weapon {[Five-Seven]}

Mora
User Playing CS2D

Quote
No, It's:
If I hit bot/player from 5-7 it in the same moment appears in prison and he will receive the message " you are under arrest! Do not break the rules "
within 10 seconds player/bot can't leave the prison ( even if he dies and again )
And after 10 seconds, it will again be able to spawn in the ordinary info_ct/info_t

old Re: Jail Weapon {[Five-Seven]}

Rainoth
Moderator Off Offline

Quote
Ups. I made it but forgot to post. Sorry...

The Code >


It'll keep player in your spot for 10 seconds, he won't be able to walk around freely for 10 seconds because he'll be teleported to that spot for 10 seconds (and after them he will no longer be teleported)
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview