Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer CanRez()
- {
- integer parcelFlags=llGetParcelFlags(llGetPos());
- list details = llGetParcelDetails(llGetPos(),[PARCEL_DETAILS_GROUP,PARCEL_DETAILS_OWNER]);
- if (llGetOwner() == llList2Key(details,1))return TRUE; // return true if parcl owner;
- key parcel_group = llList2Key(details,0);
- integer samegroup =llList2Key(llGetObjectDetails(llGetKey(), [ OBJECT_GROUP ] ), 0) == parcel_group;
- return(parcelFlags & PARCEL_FLAG_ALLOW_CREATE_OBJECTS && parcelFlags & PARCEL_FLAG_ALLOW_SCRIPTS ) ||
- (parcelFlags & PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS && parcelFlags & PARCEL_FLAG_ALLOW_GROUP_SCRIPTS && samegroup);
- }
- default
- {
- touch_start(integer total_number)
- {
- if(CanRez()){
- llOwnerSay("Can Rez");
- } else {
- llOwnerSay("Can Not Rez");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement