I like to do guy lifted the mines on each cell?
Forum
Scripts
Lua Scripts/Questions/HelpI like to do guy lifted the mines on each cell?
can you explain more .. i didn't understand any thing.
In this server is a Barbed Wire Guy and Darkness
How to make this Barbed Wire Guy and Darkness
DC
Leegao
Blazzingxx
Flacko
TKDand many others .
if you want it mines not laser mines i think you have only to change the id of the weapon.
here is the script :Click here
Starkkz has written
If think you saw it wrong mate, I think you mean this line where the number is highlighted on and no that is not a player id it's the weapon id.Even though I'm pretty poor on lua scripting knowledge I at least know this.
TicTac has written
Who can tell me script when player step on tile and he got equiped? with ak47 or something ?
i v got real bad scripting skillz but ill giv ei t a try:
1
2
3
4
2
3
4
addhook(walk.equipwalk) function(walk.equipwalk) if(player id ) walk tile([u]position x y[/u]) parse (equip player id [u]87 78 98[/u])
?
TicTac has written
Who can tell me script when player step on tile and he got equiped? with ak47 or something ?
Ok, I made one example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
_parses = {[[equip]],[[setweapon]],[[sv_msg2]]}
_weapon = 45
_your_x = 14
_your_y = 14
local function blazz_parse(cmd,p1,p2,p3)
	local p, n
	p = [[ ]] ; n = [[ ]]
	if p1 then p = p..p1..n end
	if p2 then p = p..p2..n end
	if p3 then p = p..p3..n end
	parse(cmd..n..p)
end
addhook([[movetile]],[[p_tile_equip]])
function p_tile_equip(p_,_x,_y)
	if (_x == _your_x and _y == _your_y) then
		blazz_parse(_parses[1],p_,_weapon)
		blazz_parse(_parses[2],p_,_weapon)
		blazz_parse(_parses[3],p_,[[You Get Laser For Being In Secret Spot!@C]])
	end
end
edited 3×, last 20.01.10 05:04:19 pm
1
2
3
4
5
6
7
2
3
4
5
6
7
local function blazz_parse(cmd,...) 	local p = " " 	for i,v in ipairs(arg) do 		p = p..v.." " 	end 	parse(cmd..p) end
I'm using similar stuff on CSH config functions parses. I should show details soon.
Some of thanks goes for Leegao.
-GaS- has written
i v got real bad scripting skillz but ill giv ei t a try:
i know its totally wrong but its just a try, can anyone correct me?or help me with this
?
TicTac has written
Who can tell me script when player step on tile and he got equiped? with ak47 or something ?
i v got real bad scripting skillz but ill giv ei t a try:
1
2
3
4
2
3
4
addhook(walk.equipwalk) function(walk.equipwalk) if(player id ) walk tile([u]position x y[/u]) parse (equip player id [u]87 78 98[/u])
?
item 98 does not exist.
Click Here to see the weapons.
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
xpos = [b]type here the position "X" where the player walk.[/b]
ypos = [b]type here the position "Y" where the player walk.[/b]
addhook("movetile","equipwalk")
function equipwalk(id,x,y)
	if (x==xpos and y==ypos) then
		parse("equip "..id.." 87")
		parse("equip "..id.." 78")
	end
end
Starkkz has written
addhook("use","weaponshop")
function use(id,event,data,x,y)
if (event==100) then
if (x==trigger 10) and (y==trigger 10) then
if player(id,"money")>=400 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..player(id,"money")-400)
else
msg2(id,"Insuficcient funds!@C")
end
end
end
function use(id,event,data,x,y)
if (event==100) then
if (x==trigger 10) and (y==trigger 10) then
if player(id,"money")>=400 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..player(id,"money")-400)
else
msg2(id,"Insuficcient funds!@C")
end
end
end
This script gives error, > ')' expected near 10
How should i fix it ??
edited 1×, last 20.01.10 10:13:36 pm
BrunoRZ has written
This script gives error, > ')' expected near 10
How should i fix it ??
')' expec
Starkkz has written
addhook("use","weaponshop")
function use(id,event,data,x,y)
if (event==100) then
if (x==trigger 10) and (y==trigger 10) then
if player(id,"money")>=400 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..player(id,"money")-400)
else
msg2(id,"©255000000Tá faltano grana!@C")
end
end
end
function use(id,event,data,x,y)
if (event==100) then
if (x==trigger 10) and (y==trigger 10) then
if player(id,"money")>=400 then
parse("equip "..id.." 51")
parse("setmoney "..id.." "..player(id,"money")-400)
else
msg2(id,"©255000000Tá faltano grana!@C")
end
end
end
This script gives error, > ')' expected near 10
How should i fix it ??
')' expec
do NOT put trigger 10 only put the value.
use notepad++ it help you
here is fixed.
"attempt to call a nil value "
how you guyz read, its a weapon shop, i want put more weapons then HE
so, to do another trigger, just change X and Y ??
(i can change the money loss, and the equip too right?)
Lua Scripts/Questions/Help


Offline
