ShowMenuForPlayer

Description

Shows a previously created menu for a player.

NameDescription
menuidThe ID of the menu to show. Returned by CreateMenu.
playeridThe ID of the player to whom the menu will be shown.

Returns

1: The function executed successfully.

0: The function failed to execute. Menu and/or player doesn't exist.

Examples

new Menu:gPlayerTeleport;
public OnGameModeInit()
{
gPlayerTeleport = CreateMenu(...);
return 1;
}
if (strcmp(cmdtext, "/tele", true) == 0)
{
ShowMenuForPlayer(gPlayerTeleport, playerid);
return 1;
}

Notes

tip

Crashes the both server and player if an invalid menu ID given.

Related Functions