IsPlayerOnLadder

From GT-MP
Jump to: navigation, search
IsPlayerOnLadder
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

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


Syntax

API.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 (API.isPlayedOnLadder(player)) {
        text = "You are on a ladder";
    } else {
        text = "You are not on a ladder";
    }
    API.sendChatMessageToPlayer(player, text); //send the message
            
}


References