28.08.2010, 11:14
ok so i got this and i dont know where to put the coordinates where player to teleport on clicking one line of the list.
please help
Код:
// Test menu functionality filterscipt #include <a_samp> #define TEST_MENU_ITEMS 6 new Menu:TestMenu; new TestMenuStrings[5][16] = {"DM Area", "Race Area", "Stunt Area", "Relax Area", "Admin Area"}; 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, "/teleport", true)) { ShowMenuForPlayer(TestMenu, playerid); return 1; } return 0; }