AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   wanna know more about register_touch (https://forums.alliedmods.net/showthread.php?t=95559)

One 06-24-2009 18:35

wanna know more about register_touch
 
what i found in func is not so realy helpfull.
i wanna do a menu when player touchs other player.

PHP Code:

register_touch("player","player","touch_function")

public 
touch_function(ptoucher,ptouched)
{
if(
pToucher && pToucher 33 && is_user_alive(pToucher) )
{
// open the menu for toucher.
}
if (
pTouched && pTouched 33 && is_user_alive(pTouched) )
{
//open the menu for touched


is it right so ? what i want is to make a duel menu. when player touch other, a menu willbe opened, to ask : u wanna fight with "playername" ?
yes
no

this willbe opened for both users, if both accept the fight begins. else, happend nothing.

tpt 06-24-2009 18:43

Re: wanna know more about register_touch
 
http://forums.alliedmods.net/showthr...register_touch

Arkshine 06-24-2009 18:56

Re: wanna know more about register_touch
 
Sounds good, though you don't need to check if pToucher is between 1 and 32 since you it's the classname wanted is a player.

One 06-24-2009 19:02

Re: wanna know more about register_touch
 
hmmm. ok. & whats about the menu?
how can i read if both player choosed yes?


All times are GMT -4. The time now is 15:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.