English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 199 200 201 ... 338 339 Next To the start
06.05.10 07:25:46 pm
Up
Soja1997
User
Offline Off
Subject is the name of the Lua Scripts / Questions / Help
So this needs a picture of a white bandana that I could change colors
06.05.10 07:44:38 pm
Up
Redefinder
User
Offline Off
@BureX,Piece of cake
Code:
1
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
07.05.10 04:17:47 pm
Up
SkullFace
User
Offline Off
Code:
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
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
IMG:https://i.imgur.com/kZBVkjM.gif
P.S. - I've been extracting recently enviromental sound files from other games, if anyone is interested in them for adding them to their maps, scripts, PM me
07.05.10 04:26:37 pm
Up
Caelenn
User
Offline Off
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.
IMG:http://img233.imageshack.us/img233/4059/buttonvrf.jpg
07.05.10 04:28:10 pm
Up
Admir
User
Offline Off
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.


see the sample classes at samples folder. maybe that can help you
My curse will sail against the wind and enrage the earth.
07.05.10 04:33:02 pm
Up
Caelenn
User
Offline Off
???
IMG:http://img233.imageshack.us/img233/4059/buttonvrf.jpg
07.05.10 08:00:20 pm
Up
DRoNe
User
Offline Off
lol, Exists blend mode 'grayscale' in lua ?
edited 3×, last 07.05.10 10:56:07 pm
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
07.05.10 08:26:34 pm
Up
Soja1997
User
Offline Off
Subject is the name of the Lua Scripts / Questions / Help
So this needs a picture of a white bandana that I could change colors
07.05.10 08:31:48 pm
Up
Szkieletor
User
Offline Off
I need a script that will allow players to have more than one primary weapon at a time. Can someone help me?
07.05.10 09:23:46 pm
Up
Redefinder
User
Offline Off
@Szkieletor,mat5b's Mega Deathmatch script has that feature.
08.05.10 10:32:42 am
Up
Szkieletor
User
Offline Off
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.
10.05.10 03:05:23 pm
Up
Sudden Death
User
Offline Off
I make map but i need: when player stand on x and y (x=13 y=1,2,3,4,5,6,7) then make hud text in center position: "(name) win the race!". Please help
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"
10.05.10 05:08:16 pm
Up
CeLiL_CaN
User
Offline Off
Hi,
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
10.05.10 08:25:07 pm
Up
Redefinder
User
Offline Off
How can I disable the team kill penalty(to make no money lose to players after team killing).Sorry if I missed some of the commands but I just can't find it.
12.05.10 03:37:35 am
Up
gabpro
User
Offline Off
@redefinder :
Try to do something like this :
Code:
1
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

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
12.05.10 07:15:27 am
Up
Admir
User
Offline Off
gabpro has written:
@redefinder :
Try to do something like this :
Code:
1
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

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


player ID in hit hook? maybe a source
My curse will sail against the wind and enrage the earth.
12.05.10 07:16:17 am
Up
ohaz
User
Offline Off
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)

As you can see, the "source" parameter is the ID of the shooting player
https://ohaz.engineer - Software Engineering
12.05.10 01:04:29 pm
Up
Redefinder
User
Offline Off
@gabpro,thanks.
gabpro has written:
Not very useful but I think that can do it

Better than nothing,right?
12.05.10 05:36:39 pm
Up
gabpro
User
Offline Off
@Arctic and TheKilledDeath
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
13.05.10 02:48:31 am
Up
0ito
User
Offline Off
I need help to change the limit of setmaxhealth to make a zombie mod(similar to the blazzingxx zombie plague classes)
To the start Previous 1 2 ... 199 200 201 ... 338 339 Next To the start