26.02.2009, 03:04
Okay. I was making a menu to buy a license for a RP server and I figured out that there's something wrong with one part of the script. I think it's this part:
I think I'm missing a bracket or a ;
Please help me find what's wrong. If you don't find anything, tell me that too. THANKS!
Note: The indent is actually normal. I don't know why it's weird when I post it here.
pawn Код:
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;
}
Please help me find what's wrong. If you don't find anything, tell me that too. THANKS!
Note: The indent is actually normal. I don't know why it's weird when I post it here.