So this needs a picture of a white bandana that I could change colors
Forum
CS2D Scripts Lua Scripts/Questions/HelpSo this needs a picture of a white bandana that I could change colors
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook("_walkover","zm_assault") function zm_assault_walkover(id,x,y) if (x == 46 and y == 22) then if (player(id,"money")>2499) then msg(id,"©255000000You don't have enough money (need 2500 $)") elseif (player(id,"money")<2499) then parse("setmoney "..id.." "..(player(id,"money")-2500)) parse("equip "..id.." weapon") end end end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
addhook("_walkover","zm_assault") function zm_assault_walkover(id,x,y) if (x == 46 and y == 22) then if (player(id,"money")>2499) then parse("setmoney "..id.." "..(player(id,"money")-2500)) parse("equip "..id.." weapon") else msg(id,"©255000000You don't have enough money (need 2500 $)") end end end if (x == 46 and y == 23) then if (player(id,"money")>2999) then parse("setmoney "..id.." "..(player(id,"money")-3000)) parse("equip "..id.." weapon") else msg(id,"©255000000You don't have enough money (need 3000 $)") end end end if (x == 46 and y == 24) then if (player(id,"money")>3499) then parse("setmoney "..id.." "..(player(id,"money")-3500)) parse("equip "..id.." weapon") else msg(id,"©255000000You don't have enough money (need 3500 $)") end end end if (x == 46 and y == 25) then if (player(id,"money")>3999) then parse("setmoney "..id.." "..(player(id,"money")-4000)) parse("equip "..id.." weapon") else msg(id,"©255000000You don't have enough money (need 4000 $)") end end end if (x == 46 and y == 26) then if (player(id,"money")>4499) then parse("setmoney "..id.." "..(player(id,"money")-4500)) parse("equip "..id.." weapon") else msg(id,"©255000000You don't have enough money (need 4500 $)") end end end if (x == 46 and y == 27) then if (player(id,"money")>4999) then parse("setmoney "..id.." "..(player(id,"money")-5000)) else msg(id,"©255000000You don't have enough money (need 5000$)") end end end if (x == 46 and y == 28) then if (player(id,"money")>15999) then parse("setmoney "..id.." "..(player(id,"money")-16000)) parse("setmaxhealth "..id.." 150") else msg(id,"©255000000You don't have enough money (need 16000 $)") end end end if (x == 48 and y == 21) then msg(id,"©000255000Hi there! Want to buy some thing ?") end
like this ?! lol
you character (warrior,magican...).But i don't know
how to start.I had nothing to do with lua scripting.
Nelight has written
I will make this that when you start you can elect
you character (warrior,magican...).But i don't know
how to start.I had nothing to do with lua scripting.
you character (warrior,magican...).But i don't know
how to start.I had nothing to do with lua scripting.
see the sample classes at samples folder. maybe that can help you
edited 3×, last 07.05.10 10:56:07 pm
So this needs a picture of a white bandana that I could change colors
redefinder has written
@Szkieletor,mat5b's Mega Deathmatch script has that feature.
It's not compatible with weiwen's money script which I use too, works, but when I walk through money it dont add it to money count.
I want to be a database for lua...But not mysql or mssql...A text database...
Can I have a text database for Lua?
Pls help me
Sorry my English bad
Try to do something like this :
1
2
3
4
5
6
2
3
4
5
6
addhook("kill","NoLoseMoney") function NoLoseMoney(killer,victim,weapon,x,y) 	if player(killer,"team")==player(victim,"team") then 		parse("setmoney "..killer.." "..player(killer,"money")+3300) 	end end
Question :
How to know the ID of one player who shots in other player.
I try to do with the hook "Hit",but I fail
gabpro has written
@redefinder :
Try to do something like this :
Not very useful but I think that can do it
Question :
How to know the ID of one player who shots in other player.
I try to do with the hook "Hit",but I fail
Try to do something like this :
1
2
3
4
5
6
2
3
4
5
6
addhook("kill","NoLoseMoney") function NoLoseMoney(killer,victim,weapon,x,y) 	if player(killer,"team")==player(victim,"team") then 		parse("setmoney "..killer.." "..player(killer,"money")+3300) 	end end
Question :
How to know the ID of one player who shots in other player.
I try to do with the hook "Hit",but I fail
player ID in hit hook? maybe a source
info.txt has written
hit(id,source,weapon,hpdmg,apdmg) on hit/damage
-id: player id
-source: source player id or 0
-weapon: weapon type / source type id
-hpdmg: caused damage (health)
-apdmg: caused damage (armor)
>return: 0 - proceed normally
1 - ignore this hit (no damage)
-id: player id
-source: source player id or 0
-weapon: weapon type / source type id
-hpdmg: caused damage (health)
-apdmg: caused damage (armor)
>return: 0 - proceed normally
1 - ignore this hit (no damage)
As you can see, the "source" parameter is the ID of the shooting player
gabpro has written
Not very useful but I think that can do it
Better than nothing,right?
Quote
-source: source player id or 0
I try it,but dont work :x
Well,I will test again...
EDIT : Yeah!Some errors in LUA,then i FIX it and works *-*
Thanks!
@redefinder
Quote
Better than nothing,right?
Yeah
edited 1×, last 12.05.10 05:53:42 pm