Hallo,
Wollte mal ein Menu machen.
Hier:
#include <a_samp>
#if defined FILTERSCRIPT
#define 0xFF0000FF 0xFF0000FF
new Menu:Info;
public OnFilterScriptInit()
{
Info = CreateMenu("MenuTest",2,200.0,100.0,150.0,150.0);
AddMenuItem(Info,0,"1");
AddMenuItem(Info,0,"2");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Menu", cmdtext, true, 10) == 0)
{
ShowMenuForPlayer(Info,playerid);
return 1;
}
return 0;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == Info)
{
switch(row)
{
case 0:
{
GivePlayerMoney(playerid,-500);
GivePlayerWeapon(playerid,32,500);
SendClientMessage(playerid,0xFF0000FF,"Du hast dir eine Tec-9 für 500 Dollar gekauft");
}
case 1:
{
GivePlayerMoney(playerid,-1000);
GivePlayerWeapon(playerid,29,500);
SendClientMessage(playerid,0xFF0000FF,"Du hast dir eine kp Waffe gekaufen für 1000 Dollar");
}
}
}
return 1;
}
Errors:
D:\Users\UnLiMiTeD\Desktop\SoD\Menu.pwn(84) : error 017: undefined symbol "Info"
D:\Users\UnLiMiTeD\Desktop\SoD\Menu.pwn(16) : error 017: undefined symbol "Info"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Das Menu Script is als Filterscript