Reflex
Journeyman
Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1
|
RE: Leave House Function or ContextMenu
Ok.. Thank you very much shaklaban.. sorry about all the confusion =\ I've got one last and final question re-guarding this issue. Now I am in a situation where we have been creating special arenas and they are specified as a t_mutli_custom or t_multi_custom whatever it is called.
When trying to call the contextmenu of course the contextmenu script doesnt know how to distinguish between a player's house and a arena or a custom multi we have used for decoration around the world. What is the best way for me to add some type of distinguishing factor for the contextmenu leave house script to be able to tell it is in a player's house and not in one of my custom arenas or in some decorational house.. that doesn't have a house sign to grab the morep from ? I've already placed about 15 arenas and custom multis around the world I wouldn't mind adding tags or something to the existing ones and then adding that into part of the script but im not sure if that is the best way and or how to do that? Any help would be appreciated thanks guys.
Example:
Code:
//Part of one of my custom arena's
[DEFNAME Death_By_Dice]
MultiCreator_Saves_Death_By_Dice = i_multi_foundation_45x45
MultiCreator_Death_By_Dice_0 = 2084,-1,-3,-4
MultiCreator_Death_By_Dice_1 = 2086,0,-3,-4
MultiCreator_Death_By_Dice_2 = 1889,3,-21,1
Now also...
[FUNCTION IsOnHouse]
if ((<UID.<REGION.UID>.TYPE>==t_multi) || (<UID.<REGION.UID>.TYPE>==t_multi_custom)) && (<Z> > <SERV.MAP(<P.X>,<P.Y>,<P.M>).TERRAIN.Z>)
return 1
endif
return 0
// Leave House Script
[EVENTS e_all_players]
ON=@ContextMenuRequest
if (<isonhouse> == 1)
SRC.AddContextEntry 1001,6207,0
SRC.AddContextEntry 1000,5000,0
else
SRC.AddContextEntry 1000,5000,0
endif
ON=@ContextMenuSelect
IF (<ARGN>==1000)
f_playerinfo_d_chooser
return 1
ELIF (<ARGN>==1001) && (<isonhouse> == 1)
REF1=<UID.<SRC.REGION.UID>.MORE2>
src.go <REF1.P>
src.move s
src.fix
return 1
else
return 0
ENDIF
(This post was last modified: 04-24-2012 11:46 AM by Reflex.)
|
|
04-24-2012 11:46 AM |
|
|