SA-MP Forums Archive
Impossible Menu? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Impossible Menu? (/showthread.php?tid=186917)



Impossible Menu? - Danny - 31.10.2010

Hi,
Yesterday ive created a menu for my Carshop. My script contains 5 (or more) menu's so i know how to make them. This OnPlayerSelectedMenuRow script gives my no errors/warnings, but if i select one of the two menu options, the code wont be executed. Even not a single part of it. I have spend a few hours try to solve it, but i really dont know, please help!

Код:
		if(current == tune)
    	{
    	    switch(row)
        	{
				case 0:
				{
    				if(GetPlayerMoney(playerid) < 2500) {
				    	SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy that item!");
						TogglePlayerControllable(playerid,1);
				 		return 1;
					}
					GetPlayerName(playerid, pname, sizeof (pname));
					pInfo[playerid][dlock] = 1;
					dini_IntSet(pname,"dlock",1);
					SendClientMessage(playerid, COLOR_GREEN,"You have bought a Distance Lock for $2500.");
					GivePlayerMoney(playerid, -2500);
					TogglePlayerControllable(playerid,1);
					return 1;
				}
				case 1:
				{
    				if(GetPlayerMoney(playerid) < 1000) {
				    	SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy that item!");
						TogglePlayerControllable(playerid,1);
				 		return 1;
					}
					GetPlayerName(playerid, pname, sizeof (pname));
					pInfo[playerid][GPS] = 1;
					dini_IntSet(pname,"gps",1);
					SendClientMessage(playerid, COLOR_GREEN,"You have bought a GPS for $2500.");
					GivePlayerMoney(playerid, -1000);
					TogglePlayerControllable(playerid,1);
					return 1;
				}
			}
		}
	}