#1

hi i need help how to add a menu item at this code?

pawn Код:
#include <a_samp>

#define TEST_MENU_ITEMS 6

new Menu:TestMenu;
new TestMenuStrings[6][16] = {"Test1", "Test2", "Test3", "Test4", "Test5", "Test6"};

HandleTestMenuSelection(playerid, row)
{
    new s[256];

    if(row < TEST_MENU_ITEMS) {
        format(s,256,"You selected item %s",TestMenuStrings[row]);
        SendClientMessage(playerid,0xFFFFFFFF,s);
    }
}

InitTestMenu()
{
    TestMenu = CreateMenu("Test Menu", 1, 200.0, 150.0, 200.0, 200.0);

    for(new x=0; x < TEST_MENU_ITEMS; x++) {
        AddMenuItem(TestMenu, 0, TestMenuStrings[x]);
    }
}

public OnFilterScriptInit()
{
    InitTestMenu();
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    new Menu:PlayerMenu = GetPlayerMenu(playerid);

    if(PlayerMenu == TestMenu) {
       HandleTestMenuSelection(playerid, row);
    }
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/menutest", true)) {
       ShowMenuForPlayer(TestMenu, playerid);
       return 1;
    }
    return 0;
}
please help i whant add a menu item so if the ppl selected a menu item they push shift then they teleport to that place how to do that please help


ty alot

P.S sorry for my bad english im Netherlands
Reply
#2

plzz help
Reply
#3

https://sampwiki.blast.hk/wiki/Creating_a_simple_Menu
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)