Forum
 
 
Scripts 
 Lua Scripts/Questions/Help1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
addhook("projectile","throwsnowball") function throwsnowball(id,wpn,x,y)
	if wpn==75 then
		parse("spawnitem "..wpn.." "..(x/32).." "..(y/32))
		parse("equip "..id.." 50")
		parse("strip "..id.." 75")
		parse("setweapon "..id.." 50")
		hassnowball=0
	end
end
addhook("ms100","checksnowball") function checksnowball()
	if hassnowball==0 then
		if (item(75,"exists")) then
			--
		else
			parse("equip "..id.." "..math.random(1,game("sv_maxplayers"))
			parse("strip "..id.." 50")
			parse("setweapon "..id.." 75")
			hassnowball=1
		end
	end
end
i want if you throw an snow ball on the wall it dosent spawns there it spawns in the arena
1
2
3
4
2
3
4
addhook("kill","no_money")
function no_money(id)
	parse("setmoney "..id.." "..(player(id,"money")-290))
end
 iDios has written
Lol, I don't understand tiiger87, you want make a deal  
  ?!
And i have my RP lua, i just want the save !
What is your pseudo in game ?
...
  ?!And i have my RP lua, i just want the save !
What is your pseudo in game ?
...
its like wfws one, only with different design
 and i didnt copy it
And yes, i want to make a deal
 lololol COOKIES! 
 1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
team1 = 0
addhook("second","on")
function on(id,)
if (team1=1) then
msg(id,"hello world!")
end
end
addhook("say","makeon")
function makeon(id,txt)
if (txt=="!hello") then
team1 = 1
end
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
team1 = 0
addhook("second","on")
function on()
	if (team1==1) then
		msg("hello world!") -- for msg that see it one player: msg2(id,"hello world!")
	end
end
addhook("say","makeon")
function makeon(id,txt)
	if (txt=="!hello") then
		team1 = 1
	end
end
in if you must use only: ==, >=, <=, ~=
edited 1×, last 27.09.10 01:53:38 pm
  1
2
3
4
5
6
7
2
3
4
5
6
7
if (x == 35 and y == 13) then
		local money = player(id,"money")
        	if money>999 then
		parse("setmoney "..id.." "..(player(id,"money") - 1000))
		end
	end
end
1
2
3
4
5
2
3
4
5
if (player(id,'tilex') == 35 and player(id,'tiley') == 13) then
	if player(id,"money")>=1000 then
		parse("setmoney "..id.." "..(player(id,"money") - 1000))
	end
end
think this should work
 a colored word.For example:
msg2(id,"©160160255Current Class: Infantry")
there is a number how can i know the color of this number in text?
 Nelight has written
I have got a question.When I write a word,I want do make
a colored word.For example:
msg2(id,"©160160255Current Class: Infantry")
there is a number how can i know the color of this number in text?
a colored word.For example:
msg2(id,"©160160255Current Class: Infantry")
there is a number how can i know the color of this number in text?
map editor -> Create an msg -> Change color ->
RED = First 000
GREEN = Secound 000
BLUE = Third 000
so theres 9 numbers
if you want it to be green then do this
1
000255000
Red is the first and has no color to mix with
Green is the secound which is 255, 255 = the max value of the colours so it will be fully green
As in the red the Blue has no color to mix with since we wanted to have an green color
doesnt work ...
pic 1.

~~~
pic 2.
  BureX has written
@Yasday
doesnt work ...
pic 1.

~~~
pic 2.

doesnt work ...
pic 1.

~~~
pic 2.

omg
1
2
3
4
5
6
2
3
4
5
6
if (x == 35 and y == 13) then
     if (player(id,"money")>999) then
          parse("setmoney "..id.." "..(player(id,"money") - 1000))
          end
     end
end
1
parse ("trigger nameofdoor")
1
2
3
4
2
3
4
addhook("objectkill","npcmoney")
function npcmoney(id,player)
     parse("setmoney "..id.." "..(player(id,"money")+300))
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
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
addhook("serveraction","spawn5")
function spawn5(id,action)
if act == 1 then
freeimage(id)
id1=image("gfx/light.bmp",1,1,200+id)
imagescale(id1,1,1)
imageblend(id,1)                                        
imagealpha(id,0.5)
if (player(id,"team") == 2) then
imagecolor(id1,255,255,255)
elseif (player(id,"team") == 1) then
imagecolor(id1,255,255,255)
end
end
end
addhook("buy","spawn2")
function spawn2(id,weapon)
if weapon ==50 then
freeimage(id)
id1=image("gfx/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
if (player(id,"team") == 2) then
imagecolor(id1,0,0,0)
elseif (player(id,"team") == 1) then
imagecolor(id1,0,0,0)
end
end
end

edited 6×, last 29.09.10 08:26:17 pm
1
2
3
4
2
3
4
addhook("objectkill","npcmoney")
function npcmoney(id,player)
parse("setmoney "..player.." "..(player(player,"money")+300))
end
And, I'd also like to ask how to use the string.format function, as I see it as a powerful tool, yet I don't know how to use it.
edited 1×, last 28.09.10 12:07:59 am
 MasterAsp has written
@Deatherr Your using the object ids id for the money equip, you want to use the second parameter for the setmoney funciton.
  
And, I'd also like to ask how to use the string.format function, as I see it as a powerful tool, yet I don't know how to use it.
1
2
3
4
2
3
4
addhook("objectkill","npcmoney")
function npcmoney(id,player)
parse("setmoney "..player.." "..(player(player,"money")+300))
end
And, I'd also like to ask how to use the string.format function, as I see it as a powerful tool, yet I don't know how to use it.
Like I said i'm horrible at script so... idk is my anwser.. thanks for fixing it
 Lua Scripts/Questions/Help


 Offline