IsPlayerOnLadder

From GTA Network Wiki
Jump to: navigation, search

IsPlayerOnLadder
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

This function returns true, if specified player is on ladder, false otherwise.

Syntax

bool NAPI.Player.IsPlayerOnLadder(Client player);

Required Arguments

  • player: parameter input should be in Client type.

NOTE: This function returns data in bool type.

Usage example

[Command("onLadder")]
public void onLadder(Client player)
{
    string text;
    // check if player is on ladder
    if (NAPI.Player.IsPlayedOnLadder(player)) {
        text = "You are on a ladder";
    } else {
        text = "You are not on a ladder";
    }
    NAPI.Chat.SendChatMessageToPlayer(player, text); //send the message
            
}

Changelog

Version Description
1.0 Release.

References