I want to make a trigger when i press USE button that player will get weapon which i will choosed...
http://img519.imageshack.us/img519/5136/triggerb.png
tile_use_x = [b]type the tile coordinates (X) [/b] tile_use_y = [B]type the tile coordinates (Y) [/b] wpn = [b]Item type here[/b] addhook("use","mod_use") function mod_use_(id,event,data,x,y) 	if x == tile_use_x and y = tile_use_y then 		parse("equip "..id.." "..wpn) 	end end
addhook("use","mod_use") function mod_use(id,event,data,x,y) 	if x == X1 and y == Y1 then 		parse("equip "..id.." "..WPN1) 	end 	if x == X2 and y == Y2 then 		parse("equip "..id.." "..WPN2) 	end 	-- and so on... end
parse ("setmoney "..id.." "..(player(id,"money")-xyz));
addhook("use","mod_use") function mod_use(id,event,data,x,y) if x == X1 and y == Y1 then parse("equip "..id.." "..WPN1) 	 parse ("setmoney "..id.." "..(player(id,"money")-1500)); end if x == X2 and y == Y2 then parse("equip "..id.." "..WPN2) 	 parse ("setmoney "..id.." "..(player(id,"money")-33300)); end -- and so on... end
if (player(id,"money")>=1500) then end
if (player(id,"money")>=1500) then xyz... else if(player(id,"money")<1500) then msg2 (id,"©255000000this item costs 1500$!@C"); end
addhook("use","mod_use") function mod_use(id,event,data,x,y) 	if x == 71 and y == 35 then 		if (player(id,"money")>=4500 then 			parse("setmoney "..id.." ..(player(id,"money")-4500)"); 			parse("equip "..id.." ..41); 		else 			msg2(id,"©255000000This item costs $4500!@C"); 		end 	elseif x == 71 and y == 38 then 		if (player(id,"money")>=800) then 			parse("setmoney "..id.." ..(player(id,"money")-800)"); 			parse("equip "..id.." "..41); 		else 			msg2(id,"©255000000This item costs $800!@C"); 		end 	elseif x == 71 and y == 39 then 		if (player(id,"money")>=2000) then 			parse("setmoney "..id.." ..(player(id,"money")-2000)"); 			parse("equip "..id.." "..59); 		else 			msg2(id,"©255000000This item costs $2000!@C"); 		end 	-- And so on... 	end end
addhook("use","mod_use") function mod_use(id,event,data,x,y) 	if x == 71 and y == 35 then 		if (player(id,"money")>=4500) then 			parse("setmoney "..id.." "..player(id,"money")-4500) 			parse("equip "..id.." "..41) 		else 			msg2(id,"©255000000This item costs $4500!@C") 		end 	elseif x == 71 and y == 38 then 		if (player(id,"money")>=800) then 			parse("setmoney "..id.." "..player(id,"money")-800) 			parse("equip "..id.." "..41) 		else 			msg2(id,"©255000000This item costs $800!@C") 		end 	elseif x == 71 and y == 39 then 		if (player(id,"money")>=2000) then 			parse("setmoney "..id.." "..player(id,"money")-2000) 			parse("equip "..id.." "..59) 		else 			msg2(id,"©255000000This item costs $2000!@C") 		end 	-- And so on... 	end end