mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-09-12 23:45:12 -04:00
Added a check to make sure player is close to object when utilizing it
This commit is contained in:
@@ -30,6 +30,15 @@ trigger OnObjectMenuSelect(obj_id player, int item)
|
||||
if ( hasEncryptionKey( player ) )
|
||||
return SCRIPT_CONTINUE;//you've already got one
|
||||
|
||||
location here = getLocation (player);
|
||||
location term = getLocation (self);
|
||||
float range = getDistance(here, term);
|
||||
if (range > 10.0)
|
||||
{
|
||||
sendSystemMessage (player, new string_id ( SYSTEM_MESSAGES, "elev_range" ) );
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
|
||||
sui.msgbox(player, new string_id ( SYSTEM_MESSAGES, "download_complete" ));
|
||||
|
||||
obj_id playerInv = utils.getPlayerDatapad(player);
|
||||
|
||||
Reference in New Issue
Block a user