Scripting/Squirrel/Functions/Player.StandingOnObject

From Vice City Multiplayer
Jump to navigation Jump to search

Syntax

player.StandingOnObject

Description

This function will return the instance of the object player is standing on, if it was created via CreateObject

Example

function onPlayerCommand( player, cmd, text )
{
    if( cmd == "manipobj" )
    {
        local obj = player.StandingOnObject;
        if( obj ) return MessagePlayer( "The object you are standing on, is manipulable by script", player );
        else return MessagePlayer( "There is no object created by script, under your feet", player );
    }
}

Notes

Call onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.