Problem With F_Menu
#1

can someone help me pls to fix this ?

Код:
#include <a_samp>
#include <F_Menu>

#define FILTERSCRIPT

#define COLOR_WHITE 0xFFFFFFFF

new Menu:MyMenu;

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Enabled Remulis Weapons Menu");
	print("--------------------------------------\n");

	MyMenu = F_CreateMenu("Ginklu Meniu")

  F_AddMenuItem(MyMenu, 0, "M4");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "AK-K7");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "MP5");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "Deagle");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "Tech-9");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "9mm");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "Shotgun");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "Silent 9mm");F_AddMenuItem
	F_AddMenuItem(MyMenu, 0, "Combat Shotgun");F_AddMenuItem
	return 1;
}

public OnFilterScriptExit()
{
  print("\n--------------------------------------");
	print(" Disabled Remulis Creation");
	print("--------------------------------------\n");
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/gun", cmdtext, true, 10) == 0)
	{
		F_ShowMenuForPlayer(MyMenu, playerid);
		TogglePlayerControllable(playerid, false);
		return 1;
	}
	return 0;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
  F_HideMenuForPlayer(MyMenu, playerid);
  new Menu:current;
  current = GetPlayerMenu(playerid);
  if(current == MyMenu)
  {
    switch(row)
    {
      case 0:
			{
        if(GetPlayerMoney(playerid) > 60000)
				{
					GivePlayerMoney(playerid,-60000);
					GivePlayerWeapon(playerid, 31, 120);
          SetTimer("neturi pinigu",100, 1);
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 60000$");
				}
      }
      case 1:
			{
				if(GetPlayerMoney(playerid) > 60000)
				{
					GivePlayerMoney(playerid,-60000);
					GivePlayerWeapon(playerid, 30, 120);
          SetTimer("neturi pinigu",100, 1);
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 60000$");
				}
      }
      case 2:
			{
				if(GetPlayerMoney(playerid) > 40000)
				{
					GivePlayerMoney(playerid,-40000);
					GivePlayerWeapon(playerid, 29, 120);
          SetTimer("neturi pinigu",100, 1);
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 40000$");
				}
      }
      case 3:
			{
				if(GetPlayerMoney(playerid) > 25000)
				{
       	  GivePlayerMoney(playerid,-25000);
				  GivePlayerWeapon(playerid, 24, 120);
          SetTimer("neturi pinigu",100, 1);
				  TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"neturi 25000$");
				}
      }
      case 4:
			{
				if(GetPlayerMoney(playerid) > 10000)
				{
       	  	GivePlayerWeapon(playerid, 32, 1000);
      	  GivePlayerMoney(playerid,-10000);
          SetTimer("neturi pinigu",100, 1);
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 10000$");
				}
      }
      case 5:
			{
				if(GetPlayerMoney(playerid) > 2000)
				{
       	  	GivePlayerWeapon(playerid, 22, 1000);
      	  GivePlayerMoney(playerid,-20000);
          SetTimer("neturi pinigu",100, 1);
					TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 20000$");
				}
      }
			case 6:
			{
				if(GetPlayerMoney(playerid) > 1000)
				{
					GivePlayerMoney(playerid,-1000);
			 		GivePlayerWeapon(playerid, 25, 100);
          SetTimer("neturi pinigu",100, 1);
			    TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 1000$");
				}
      }
			case 7:
			{
				if(GetPlayerMoney(playerid) > 1000)
				{
					GivePlayerMoney(playerid,-1000);
			 		GivePlayerWeapon(playerid, 23, 100);
          SetTimer("neturi pinigu",100, 1);
			    TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 1000$");
				}
 }
			case 8:
			{
				if(GetPlayerMoney(playerid) > 10000)
				{
					GivePlayerMoney(playerid,-10000);
			 		GivePlayerWeapon(playerid, 27, 400);
          SetTimer("neturi pinigu",100, 1);
			    TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 10000$");
				}
			}
		  case 9:
			{
				if(GetPlayerMoney(playerid) > 1000)
				{
					GivePlayerMoney(playerid,-1000);
			 		GivePlayerWeapon(playerid, 28, 700);
          SetTimer("neturi pinigu",100, 1);
			    TogglePlayerControllable(playerid, true);
				}
				else
				{
					SendClientMessage(playerid,COLOR_WHITE,"Neturi 1000$");


	}
      }
		}
  }

	return 1;
}
Reply
#2

Why don';t you post it in it;s topic.
Reply
#3

?
Reply
#4

pls enybody help
Reply
#5

post it here:
http://forum.sa-mp.com/index.php?top...7791#msg577791
Reply
#6

Lietuvis D
Reply
#7

Quote:
Originally Posted by karolis1478
Lietuvis D
Ar tai taip juokinga?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)