Forum
CS2D Scripts Spawn NPCSpawn NPC
12 replies 1
1
2
3
4
5
6
2
3
4
5
6
addhook("usebutton","hhbutton") function hhbutton(id) if player(id,"tilex")==x and player(id,"tiley")==y then menu(id,"MY NPC,LOL,LOL1,LOL2") end end
addhook("usebutton","hhbutton")
if player(id,"tilex")==x58 and
player(id,"tilex")==y36 then
menu(id,"MY NPC,LOL,LOL1,LOL2")
end
end
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("usebutton","hhbutton") function hhbutton(id) 	if player(id,"tilex")==58 and player(id,"tilex")==36 then 		menu(id,"MY NPC,LOL,LOL1,LOL2") 	end end
Or my way
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook('usebutton', 'AA_button') function AA_button(id) 	if player(id, 'tilex') == 58 and player(id, 'tiley') == 36 then 		menu(id, 'title, button1, button2') 	end end
by the way,delete x and y and put your cordinates
Not Tile Position y|x - frame
----
You should make the tilex 38 and tiley 240.
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook('use', 'AA_use') function AA_use(id) 	if player(id, 'tilex') == 58 and player(id, 'tiley') == 36 then 		menu(id, 'title, button1, button2') 	end end
1