Scripting/Squirrel/Functions/Player.StandingOnObject

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

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.