English Announce a killer "WANTED" script.

10 replies
Goto Page
To the start Previous 1 Next To the start
Up
muxarus
User
Offline Off
Hello us nrealSoftWare!

Today i maked one script and me need your help.
So, i want to make script e.t. if your team is terrorsts and you killed somebody you will be wanted, my example but it didn't work :

Code:
1
2
3
4
5
6
addhook("kill","playerkill")
function playerkill(killer,victim)
          if player(killer,id) team==1 then
          msg2("©255000000Caution cops! ..player(killer,name).. WANTED FOR MURDER!")
end
end
IMG:http://steamsignature.com/status/german/76561198081961553.png
IMG:http://steamsignature.com/AddFriend.png
01.02.15 09:02:58 pm
Up
Rainoth
Moderator
Offline Off
Code:
1
2
3
4
5
6
addhook("kill","playerkill")
function playerkill(killer,victim)
     if player(killer,"team") == 1 then
          msg2("\169255000000Caution cops! "..player(killer,"name").." WANTED FOR MURDER!")
     end
end


The function "player" requires two arguments - player id and value you want to get.
player(id,"value") is the correct way to check stuff about a player
your killer id is "killer" so "id" is not valid whereas your value is "team" so it should be called as a function argument, otherwise lua won't understand it. Finally, all values in messages have to be properly concatenated or they won't work.
edited 1×, last 01.02.15 09:31:06 pm
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
01.02.15 09:21:16 pm
Up
muxarus
User
Offline Off
@user Rainoth: oh okay thanks, but now i have error in console: sys/lua/server.lua:4: bad argument #2 to 'player' (string expected, got nil) how to fix that problem?
IMG:http://steamsignature.com/status/german/76561198081961553.png
IMG:http://steamsignature.com/AddFriend.png
01.02.15 09:32:18 pm
Up
Rainoth
Moderator
Offline Off
My mistake. I didn't look through your code properly. You had made another mistake but I didn't correct it. Value has to be enclosed in quote symbol "
so what you wrote was
name
when it had to be
"name"

I edited the code in my previous reply. It should not give that error now.
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
01.02.15 09:37:31 pm
Up
muxarus
User
Offline Off
@user Rainoth: Thank you! but i have error in msg2 ''bad argument', and there fix: msg(string.char(169).."255000000Caution cops! "..player(killer,"name").." WANTED FOR MURDER!") '

Thank you! Thank you VERY MUCH!!!
IMG:http://steamsignature.com/status/german/76561198081961553.png
IMG:http://steamsignature.com/AddFriend.png
01.02.15 09:57:23 pm
Up
Matiherrera02
User
Offline Off
Code:
1
msg2("©169255000000Caution cops!"..player(killer,"name")"WANTED FOR MURDER!")
I am a human
01.02.15 10:13:54 pm
Up
Rainoth
Moderator
Offline Off
Hah, that's another mistake I overlooked. Btw, don't look at user Matiherrera02 code line because it's incorrect. Anyways, glad you got things sorted out.
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
08.02.15 04:26:43 pm
Up
Muxye
User
Offline Off
user muxarus has written:
Hello us nrealSoftWare!

Today i maked one script and me need your help.
So, i want to make script e.t. if your team is terrorsts and you killed somebody you will be wanted, my example but it didn't work :

Code:
1
2
3
4
5
6
addhook("kill","playerkill")
function playerkill(killer,victim)
          if player(killer,id) team==1 then
          msg2("©255000000Caution cops! ..player(killer,name).. WANTED FOR MURDER!")
end
end

try this code
Code:
1
2
3
4
5
6
addhook("kill","playerkill")
function playerkill(killer,victim)
     if player(killer,"team") == 1 then
{
          msg2(@2552552555"@169255000000Caution cops! "..player(killer,"name").." WANTED FOR MURDER!")
}
i love gamez play 2 free
09.02.15 12:25:58 am
Up
RedizGaming
GAME BANNED
Offline Off
You can try to use it

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function Array(size,value) 
     local array = {}
     for i = 1, size do
          array[i]=value
     end
     return array
end

criminal = Array(32,0)

addhook("kill","a")
function a(killer,victim,wpn)
     if criminal[victim]==true then
          criminal[killer]=false
          parse('setmoney '..id..' '..player(id,'money')+1500..' ')
          msg2(killer,"000255000","You Kill A Criminal!!, We Pay to you 1500$!")
     else
          criminal[killer]=true
          parse('setmoney '..id..' '..player(id,'money')-1500..' ')
          msg2(killer,"255000000","You Kill A Inosent Player!. Money less 1500$!")
     end
end


Try to use it
Never use HACKS/CHEATS , see my status. I used hack 2 times , 1 year ago... i get game banned for be a stupid guy
09.02.15 01:52:12 am
Up
Yazir
User
Offline Off
msg2 uses 2 params.
msg2(id of the player the message be shown,string message)
09.02.15 10:56:02 am
Up
muxarus
User
Offline Off
user RedizGaming has written:
You can try to use it

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function Array(size,value) 
     local array = {}
     for i = 1, size do
          array[i]=value
     end
     return array
end

criminal = Array(32,0)

addhook("kill","a")
function a(killer,victim,wpn)
     if criminal[victim]==true then
          criminal[killer]=false
          parse('setmoney '..id..' '..player(id,'money')+1500..' ')
          msg2(killer,"000255000","You Kill A Criminal!!, We Pay to you 1500$!")
     else
          criminal[killer]=true
          parse('setmoney '..id..' '..player(id,'money')-1500..' ')
          msg2(killer,"255000000","You Kill A Inosent Player!. Money less 1500$!")
     end
end


Try to use it

good script but some user helped me with that script.
IMG:http://steamsignature.com/status/german/76561198081961553.png
IMG:http://steamsignature.com/AddFriend.png
To the start Previous 1 Next To the start