26.02.2009, 23:17
Quote:
Originally Posted by Jefff
Код:
public OnPlayerSelectedMenuRow(playerid, row) { new Menu:CurrentMenu = GetPlayerMenu(playerid); if(CurrentMenu == BuyLicenses) { switch(row) { case 0: //Driving License { if(GetPlayerMoney(playerid) >= 50) { GivePlayerMoney(playerid, -50); PlayerInfo[playerid][pCarLic] = 1; }else SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough cash to buy a driver's license."); } case 1: //Firearms License { if(GetPlayerMoney(playerid) >= 800) { GivePlayerMoney(playerid, -800); PlayerInfo[playerid][pGunLic] = 1; }else SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough cash to buy a firearms license."); } case 2: //Boating License { if(GetPlayerMoney(playerid) >= 800) { GivePlayerMoney(playerid, -800); PlayerInfo[playerid][pBoatLic] = 1; }else SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough cash to buy a boat license."); } case 3: //Flying License { if(GetPlayerMoney(playerid) >= 3200) { GivePlayerMoney(playerid, -3200); PlayerInfo[playerid][pGunLic] = 1; }else SendClientMessage(playerid, COLOR_GRAD1, "You do not have enough cash to buy a flying license."); } } } return 1; } |