SphereCommunity
Suggestion on this function that i made - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Suggestion on this function that i made (/Thread-Suggestion-on-this-function-that-i-made)



Suggestion on this function that i made - Rizz - 01-09-2013 11:42 AM

Hi all,
i need a secure way to check if a player is inside a deed house.

I used this function made by myself:

PHP Code:
[FUNCTION ISINHOUSE]
LOCAL.house_id=040<region.defname>
IF (<
serv.uid.<LOCAL.house_id>.type>==t_multi) || (<serv.uid.<LOCAL.house_id>.type>==t_multi_custom)
    
LOCAL.check=1
ELSE
    
LOCAL.check=0
ENDIF

return <
dLOCAL.check

What do you think?


RE: Suggestion on this function that i made - Shaklaban - 01-09-2013 03:33 PM

you can use isonhouse function from community packs house system:


PHP Code:
[FUNCTION IsOnHouse]
IF ((<
UID.<REGION.UID>.TYPE>==t_multi) || (<UID.<REGION.UID>.TYPE>==t_multi_custom)) //this part not needed for your purpose && (<Z> > <SERV.MAP(<P.X>,<P.Y>,<P.M>).TERRAIN.Z>)
 
return 1
ENDIF
return 




RE: Suggestion on this function that i made - Rizz - 01-10-2013 05:28 AM

Thx ;D