31.10.2010, 10:51
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!
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; } } } }