Skip to main content

ShowMenuForPlayer

คำอธิบาย

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.

ส่งคืน

1: The function executed successfully.

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

ตัวอย่าง

new Menu:MENU_PlayerTeleport;

public OnGameModeInit()
{
MENU_PlayerTeleport = CreateMenu(...);
return 1;
}

if (strcmp(cmdtext, "/tele", true) == 0)
{
ShowMenuForPlayer(MENU_PlayerTeleport, playerid);
return 1;
}

บันทึก

tip

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

ฟังก์ชั่นที่เกี่ยวข้องกัน