Problem with ShowMenuForPlayer
#1

I've recently added 2 menus to the list of menus in OnPlayerSelectedMenuRow and now I am getting these errors.

Код:
C:\Users\Preston\Desktop\SA-MP Servers\Lsrcr\gamemodes\1.8.pwn(11774) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Preston\Desktop\SA-MP Servers\Lsrcr\gamemodes\1.8.pwn(11774 -- 11775) : error 028: invalid subscript (not an array or too many subscripts): "Current"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

Show us a snippet of your code
Reply
#3

Here's the code of the two new menus I added. These two menus are the 10th/11th one I added.
pawn Код:
//Menus
new Menu:GrottiMenu;
new Menu:GrottiBikesMenu;

//Menu Designs
GrottiMenu = CreateMenu("~r~Grotti ~w~Car Showroom",1,15,150,200);
SetMenuColumnHeader(GrottiMenu , 0, "~w~Please select your vehicle.");
AddMenuItem(GrottiMenu,0,"Sultan");
AddMenuItem(GrottiMenu,0,"Elegy");
AddMenuItem(GrottiMenu,0,"Jester");
AddMenuItem(GrottiMenu,0,"Uranus");
AddMenuItem(GrottiMenu,0,"Cheetah");
AddMenuItem(GrottiMenu,0,"Turismo");
AddMenuItem(GrottiMenu,0,"Infernus");
AddMenuItem(GrottiMenu,0,"Super GT");
AddMenuItem(GrottiMenu,0,"Phoenix");
AddMenuItem(GrottiMenu,0,"Blade");
AddMenuItem(GrottiMenu,0,"Motorcycles");
AddMenuItem(GrottiMenu,0,"Rob Grotti");

GrottiBikesMenu = CreateMenu("~p~Grotti Bike Showroom",1,15,150,200);
SetMenuColumnHeader(GrottiBikesMenu , 0, "~w~Please select your vehicle.");
AddMenuItem(GrottiBikesMenu,0,"BMX Bike");
AddMenuItem(GrottiBikesMenu,0,"FCR-900");
AddMenuItem(GrottiBikesMenu,0,"NRG-500");
AddMenuItem(GrottiBikesMenu,0,"Freeway");
AddMenuItem(GrottiBikesMenu,0,"Sanchez");
AddMenuItem(GrottiBikesMenu,0,"Quad");
AddMenuItem(GrottiBikesMenu,0,"Back");

public OnPlayerSelectedMenuRow(playerid, row)
{
    new Menu:Current = GetPlayerMenu(playerid);
    if(Current == GrottiMenu)
    {
        TogglePlayerControllable(playerid, 1);

        switch(row)
        {
            case 0:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 39999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Sultan car ($40000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(560, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Sultan from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Sultan from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(560, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Sultan vehicle from Grotti for $40000");
                GivePlayerMoney(playerid,-40000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                UsedAutoRecently[playerid] += 90;
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Sultan car from Grotti ($40000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Sultan vehicle to %s(%d) - You receive $40000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,40000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $40000 from a Sultan car sale",autoowner,i);
                        }
                    }
                }
            }
            case 1:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 59999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Elegy car ($60000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(562, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Elegy from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Elegy from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(562, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Elegy vehicle from Grotti for $60000");
                GivePlayerMoney(playerid,-60000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Elegy car from Grotti ($60000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Elegy vehicle to %s(%d) - You receive $60000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,60000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $60000 from a Elegy car sale",autoowner,i);
                        }
                    }
                }
            }
            case 2:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 79999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Jester car ($80000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(559, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Jester from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Jester fron his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(559, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Jester vehicle from Grotti for $80000");
                GivePlayerMoney(playerid,-80000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Jester car from Grotti ($80000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Jester vehicle to %s(%d) - You receive $80000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,80000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $80000 from a Jester car sale",autoowner,i);
                        }
                    }
                }
            }
            case 3:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 49999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Uranus vehicle ($50000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(558, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Uranus from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Uranus from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(558, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Uranus vehicle from Grotti for $50000");
                GivePlayerMoney(playerid,-50000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Uranus car from Grotti ($50000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Uranus vehicle to %s(%d) - You receive $50000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,50000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $50000 from a Uranus car sale",autoowner,i);
                        }
                    }
                }
            }
            case 4:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 99999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Cheetah car ($100000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(415, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Cheetah from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Cheetah from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(415, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Cheetah vehicle from Grotti for $100000");
                GivePlayerMoney(playerid,-100000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Cheetah car from Grotti ($100000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Cheetah vehicle to %s(%d) - You receive $100000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $100000 from a Cheetah car sale",autoowner,i);
                        }
                    }
                }
            }
            case 5:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 119999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Turismo car ($120000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(451, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Turismo from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Turismo from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(451, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Turismo vehicle from Grotti for $120000");
                GivePlayerMoney(playerid,-120000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Turismo car from Grotti ($120000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Turismo vehicle to %s(%d) - You receive $120000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,120000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $120000 from a Turismo car sale",autoowner,i);
                        }
                    }
                }
            }
            case 6:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 139999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Infernus vehicle ($140000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(411, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Infernus from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Infernus from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(411, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Infernus vehicle from Grotti for $140000");
                GivePlayerMoney(playerid,-140000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Infernus vehicle from Grotti ($140000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Infernus vehicle to %s(%d) - You receive $140000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,140000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $140000 from a Infernus car sale",autoowner,i);
                        }
                    }
                }
            }
            case 7:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 89999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Super GT vehicle ($90000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    Boughtcar = CreateVehicle(506, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Super GT from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Super GT from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(506, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Super GT vehicle from Grotti for $90000");
                GivePlayerMoney(playerid,-90000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Super GT car from Grotti ($90000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Super GT vehicle to %s(%d) - You receive $90000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,90000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $90000 from a Super GT car sale",autoowner,i);
                        }
                    }
                }
            }
            case 8:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 59000 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Phoenix vehicle ($60000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(603, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Phoenix from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Phoenix from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(603, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Phoenix vehicle from Grotti for $60000");
                GivePlayerMoney(playerid,-60000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Phoenix car from Grotti ($60000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Phoenix vehicle to %s(%d) - You receive $60000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,60000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $60000 from a Phoenix car sale",autoowner,i);
                        }
                    }
                }
            }
            case 9:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 34999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Blade vehicle ($35000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(536, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Blade from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Blade from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(536, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Blade vehicle from Grotti for $35000");
                GivePlayerMoney(playerid,-35000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Blade car from Grotti ($35000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Blade vehicle to %s(%d) - You receive $35000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,35000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $35000 from a Blade car sale",autoowner,i);
                        }
                    }
                }
            }
            case 10:
            {
                ShowMenuForPlayer(GrottiBikesMenu, playerid);
                return 1;
            }
            case 11:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GrottiOwner[playerid] == 1337)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"You cannot rob your own business");
                    return 1;
                }
                if(AutoRobbed == 1)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"Grotti has been robbed recently, Please wait");
                    return 1;
                }
                if(UsedAutoRecently[playerid] >= 1)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"Please wait before using Grotti again");
                    return 1;
                }
                if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_FIREMAN || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_CASSEC || gTeam[playerid] == TEAM_JAILTK)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"You cannot rob anything");
                    return 1;
                }
                if(robberrank[playerid] <=29)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"Your robber skill level is too low to rob Grotti. Type /robskill for more info");
                    return 1;
                }
                if(IsPlayerInDynamicCheckpoint(playerid, CPGrotti);
                {
                    new zrand = random(5000);
                    if(zrand >=0 && zrand <=1000)
                    {
                        SendClientMessage(playerid, 0xA9A9A9AA, "|_Robbery Failed_|");
                        SendClientMessage(playerid,COLOR_ERROR,"Your attempt to Grotti has failed");
                        UsedAutoRecently[playerid] += 120;
                        return 1;
                    }
                    else if(zrand >=1001 && zrand <=5000)
                    {
                        new plwl = GetPlayerWantedLevel(playerid);
                        SetPlayerWantedLevel(playerid, plwl +4 );
                        new mrand = random(175000);
                        new pname[30];
                        GetPlayerName(playerid, pname, 30);
                        format(string, sizeof(string), "%s(%d) Has robbed $%d from Grotti",pname,playerid,mrand);
                        SendClientMessageToAll(0x00C7FFAA, string);
                        ircSay(EchoConnection, EchoChan,string);
                        format(string, sizeof(string), "%s(%d) Has robbed $%d from Grotti",pname,playerid,mrand);
                        printf("%s", string);
                        format(string, sizeof(string), "~w~ROBBERY ~b~COMPLETE~n~~w~YOU ROBBED~n~~r~ $%d~n~~w~FROM Grotti", mrand);
                        GameTextForPlayer(playerid, string, 7000, 3);
                        new pcol = GetPlayerColor(playerid);
                        plwl = GetPlayerWantedLevel(playerid);
                        SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
                        format(string, sizeof(string), "(Grotti ROBBERY) Wanted Level %d",plwl);
                        SendClientMessage(playerid,pcol,string);
                        GivePlayerMoney(playerid, mrand);
                        oscore = GetPlayerScore(playerid);
                        AutoRobbed =1;
                        UsedAutoRecently[playerid] += 320;
                        SetPlayerScore(playerid, oscore +1);
                        if(robberrank[playerid] >=30 && robberrank[playerid] <=39)
                        {
                            SendClientMessage(playerid,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
                            robberrank[playerid] +=1;
                            commitedcrimerecently[playerid] +=360;
                        }
                        SetTimer("AutoRobbedRecent",70000,0);
                        for(new i=0;i<MAX_PLAYERS;i++)
                        {
                            if(LawEnforcementRadio[i] == 1)
                            {
                                new string1[256];
                                new string2[256];
                                new string3[256];
                                format(string1, sizeof(string1), "DISPATCH: (GROTTI ROBBERY) Grotti has been robbed. Suspect: %s(%d)", pname,playerid);
                                format(string2, sizeof(string2), "ALL UNITS: Please respond to the Grotti");
                                format(string3, sizeof(string3), "Type /radoff to turn your Law Enforcement radio off");
                                SendClientMessage(i, COLOR_ROYALBLUE, string1);
                                SendClientMessage(i, COLOR_ROYALBLUE, string2);
                                SendClientMessage(i, COLOR_DODGERBLUE, string3);
                            {
                            if(IsPlayerConnected(i))
                            {
                                GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                                if(GrottiOwner[i] == 1337)
                                {
                                    GetPlayerName(i,GrottiOwner,24);
                                    SendClientMessage(i, 0xA9A9A9AA, "|_Grotti Robbery_|");
                                    format(string, sizeof(string), "%s(%d) has robbed $%d from your Grotti",pname,playerid,mrand);
                                    SendClientMessage(i, 0x00C7FFAA, string);
                                    SendClientMessage(i, 0xA9A9A9AA, "If you're tired of losing money from your Grotti then use /sellgrotti(ID)");
                                    GivePlayerMoney(i,- mrand);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if(Current == GrottiBikesMenu)
    {
        TogglePlayerControllable(playerid, 1);
        switch(row)
        {
            case 0:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 99 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a BMX bike ($100)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(481, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a BMX Bike from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a BMX Bike from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(481, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a BMX bike from Grotti for $100");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a BMX bike from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(481, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a BMX bike from Grotti for $100");
                GivePlayerMoney(playerid,-100);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a BMX bike from Grotti ($100)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a BMX bike to %s(%d) - You receive $100",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $100 from a BMX bike sale",autoowner,i);
                        }
                    }
                }
            }
            case 1:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 89999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a FCR-900 ($90000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a FCR-900 from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a FCR-900 from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a FCR-900 from Grotti for $90000");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a FCR-900 from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a FCR-900 from Grotti for $90000");
                GivePlayerMoney(playerid,-90000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a FCR-900 from Grotti ($90000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a FCR-900 to %s(%d) - You receive $90000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,90000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $90000 from a FCR-900 sale",autoowner,i);
                        }
                    }
                }
            }
            case 2:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 139999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a NRG-500 motorbike ($140000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(522, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a NRG-500 from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a NRG-500 from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(522, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a NRG-500 motorbike from Grotti for $140000");
                GivePlayerMoney(playerid,-140000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a NRG-500 motorbike from Grotti ($140000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a NRG-500 motorbike to %s(%d) - You receive $140000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,140000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $140000 from a NRG-500 motorbike sale",autoowner,i);
                        }
                    }
                }
            }
            case 3:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 74999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Freeway Bike ($75000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(463, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Freeway Bike from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Freeway Bike from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(463, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Freeway Bike vehicle from Grotti for $75000");
                GivePlayerMoney(playerid,-75000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Freeway bike car from Grotti ($75000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Freeway Bike vehicle to %s(%d) - You receive $75000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,75000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $750000 from a Freeway Bike sale",autoowner,i);
                        }
                    }
                }
            }
            case 4:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 24999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Sanchez ($25000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Sanchez from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Sanchez from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Sanchez from Grotti for $25000");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Sanchez from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Sanchez from Grotti for $25000");
                GivePlayerMoney(playerid,-100);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Sanchez from Grotti ($25000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Sanchez to %s(%d) - You receive $25000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $25000 from a Sanchez sale",autoowner,i);
                        }
                    }
                }
            }
            case 5:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 29999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Quad ($30000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Quad from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Quad from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Quad from Grotti for $30000");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Quad from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Quad from Grotti for $30000");
                GivePlayerMoney(playerid,-100);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Quad from Grotti ($30000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Quad to %s(%d) - You receive $30000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $30000 from a Quad sale",autoowner,i);
                        }
                    }
                }
            }
            case 6:
            {
                ShowMenuForPlayer(GrottiMenu, playerid);
                return 1;
            }
        }
    }
    return 1;
}

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    else if(checkpointid == CPGrotti)
    {
        ShowMenuForPlayer(GrottiMenu, playerid);
        AbleToUseGrotti[playerid] = 1;
    }
}
Reply
#4

BUMP
Reply
#5

Which are the lines with errors ?
Reply
#6

I commented the number of the error line. The lines are 11774 and 11775.
pawn Код:
//Menus
new Menu:GrottiMenu;
new Menu:GrottiBikesMenu;

//Menu Designs
GrottiMenu = CreateMenu("~r~Grotti ~w~Car Showroom",1,15,150,200);
SetMenuColumnHeader(GrottiMenu , 0, "~w~Please select your vehicle.");
AddMenuItem(GrottiMenu,0,"Sultan");
AddMenuItem(GrottiMenu,0,"Elegy");
AddMenuItem(GrottiMenu,0,"Jester");
AddMenuItem(GrottiMenu,0,"Uranus");
AddMenuItem(GrottiMenu,0,"Cheetah");
AddMenuItem(GrottiMenu,0,"Turismo");
AddMenuItem(GrottiMenu,0,"Infernus");
AddMenuItem(GrottiMenu,0,"Super GT");
AddMenuItem(GrottiMenu,0,"Phoenix");
AddMenuItem(GrottiMenu,0,"Blade");
AddMenuItem(GrottiMenu,0,"Motorcycles");
AddMenuItem(GrottiMenu,0,"Rob Grotti");

GrottiBikesMenu = CreateMenu("~p~Grotti Bike Showroom",1,15,150,200);
SetMenuColumnHeader(GrottiBikesMenu , 0, "~w~Please select your vehicle.");
AddMenuItem(GrottiBikesMenu,0,"BMX Bike");
AddMenuItem(GrottiBikesMenu,0,"FCR-900");
AddMenuItem(GrottiBikesMenu,0,"NRG-500");
AddMenuItem(GrottiBikesMenu,0,"Freeway");
AddMenuItem(GrottiBikesMenu,0,"Sanchez");
AddMenuItem(GrottiBikesMenu,0,"Quad");
AddMenuItem(GrottiBikesMenu,0,"Back");

public OnPlayerSelectedMenuRow(playerid, row)
{
    new Menu:Current = GetPlayerMenu(playerid);
    if(Current == GrottiMenu)
    {
        TogglePlayerControllable(playerid, 1);

        switch(row)
        {
            case 0:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 39999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Sultan car ($40000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(560, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Sultan from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Sultan from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(560, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Sultan vehicle from Grotti for $40000");
                GivePlayerMoney(playerid,-40000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                UsedAutoRecently[playerid] += 90;
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Sultan car from Grotti ($40000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Sultan vehicle to %s(%d) - You receive $40000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,40000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $40000 from a Sultan car sale",autoowner,i);
                        }
                    }
                }
            }
            case 1:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 59999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Elegy car ($60000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(562, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Elegy from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Elegy from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(562, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Elegy vehicle from Grotti for $60000");
                GivePlayerMoney(playerid,-60000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Elegy car from Grotti ($60000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Elegy vehicle to %s(%d) - You receive $60000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,60000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $60000 from a Elegy car sale",autoowner,i);
                        }
                    }
                }
            }
            case 2:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 79999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Jester car ($80000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(559, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Jester from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Jester fron his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(559, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Jester vehicle from Grotti for $80000");
                GivePlayerMoney(playerid,-80000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Jester car from Grotti ($80000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Jester vehicle to %s(%d) - You receive $80000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,80000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $80000 from a Jester car sale",autoowner,i);
                        }
                    }
                }
            }
            case 3:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 49999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Uranus vehicle ($50000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(558, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Uranus from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Uranus from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(558, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Uranus vehicle from Grotti for $50000");
                GivePlayerMoney(playerid,-50000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Uranus car from Grotti ($50000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Uranus vehicle to %s(%d) - You receive $50000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,50000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $50000 from a Uranus car sale",autoowner,i);
                        }
                    }
                }
            }
            case 4:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 99999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Cheetah car ($100000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(415, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Cheetah from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Cheetah from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(415, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Cheetah vehicle from Grotti for $100000");
                GivePlayerMoney(playerid,-100000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Cheetah car from Grotti ($100000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Cheetah vehicle to %s(%d) - You receive $100000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $100000 from a Cheetah car sale",autoowner,i);
                        }
                    }
                }
            }
            case 5:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 119999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Turismo car ($120000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(451, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Turismo from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Turismo from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(451, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Turismo vehicle from Grotti for $120000");
                GivePlayerMoney(playerid,-120000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Turismo car from Grotti ($120000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Turismo vehicle to %s(%d) - You receive $120000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,120000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $120000 from a Turismo car sale",autoowner,i);
                        }
                    }
                }
            }
            case 6:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 139999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Infernus vehicle ($140000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(411, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Infernus from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Infernus from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(411, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Infernus vehicle from Grotti for $140000");
                GivePlayerMoney(playerid,-140000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Infernus vehicle from Grotti ($140000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Infernus vehicle to %s(%d) - You receive $140000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,140000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $140000 from a Infernus car sale",autoowner,i);
                        }
                    }
                }
            }
            case 7:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 89999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Super GT vehicle ($90000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    Boughtcar = CreateVehicle(506, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Super GT from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Super GT from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(506, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Super GT vehicle from Grotti for $90000");
                GivePlayerMoney(playerid,-90000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Super GT car from Grotti ($90000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Super GT vehicle to %s(%d) - You receive $90000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,90000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $90000 from a Super GT car sale",autoowner,i);
                        }
                    }
                }
            }
            case 8:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 59000 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Phoenix vehicle ($60000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(603, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Phoenix from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Phoenix from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(603, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Phoenix vehicle from Grotti for $60000");
                GivePlayerMoney(playerid,-60000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Phoenix car from Grotti ($60000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Phoenix vehicle to %s(%d) - You receive $60000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,60000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $60000 from a Phoenix car sale",autoowner,i);
                        }
                    }
                }
            }
            case 9:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 34999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Blade vehicle ($35000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(536, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Blade from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Blade from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(536, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Blade vehicle from Grotti for $35000");
                GivePlayerMoney(playerid,-35000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Blade car from Grotti ($35000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Blade vehicle to %s(%d) - You receive $35000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,35000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $35000 from a Blade car sale",autoowner,i);
                        }
                    }
                }
            }
            case 10:
            {
                ShowMenuForPlayer(GrottiBikesMenu, playerid);
                return 1;
            }
            case 11:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GrottiOwner[playerid] == 1337)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"You cannot rob your own business");
                    return 1;
                }
                if(AutoRobbed == 1)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"Grotti has been robbed recently, Please wait");
                    return 1;
                }
                if(UsedAutoRecently[playerid] >= 1)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"Please wait before using Grotti again");
                    return 1;
                }
                if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_FIREMAN || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_CASSEC || gTeam[playerid] == TEAM_JAILTK)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"You cannot rob anything");
                    return 1;
                }
                if(robberrank[playerid] <=29)
                {
                    SendClientMessage(playerid,COLOR_ERROR,"Your robber skill level is too low to rob Grotti. Type /robskill for more info");
                    return 1;
                }
                if(IsPlayerInDynamicCheckpoint(playerid, CPGrotti);
                {
                    new zrand = random(5000);
                    if(zrand >=0 && zrand <=1000)
                    {
                        SendClientMessage(playerid, 0xA9A9A9AA, "|_Robbery Failed_|");
                        SendClientMessage(playerid,COLOR_ERROR,"Your attempt to Grotti has failed");
                        UsedAutoRecently[playerid] += 120;
                        return 1;
                    }
                    else if(zrand >=1001 && zrand <=5000)
                    {
                        new plwl = GetPlayerWantedLevel(playerid);
                        SetPlayerWantedLevel(playerid, plwl +4 );
                        new mrand = random(175000);
                        new pname[30];
                        GetPlayerName(playerid, pname, 30);
                        format(string, sizeof(string), "%s(%d) Has robbed $%d from Grotti",pname,playerid,mrand);
                        SendClientMessageToAll(0x00C7FFAA, string);
                        ircSay(EchoConnection, EchoChan,string);
                        format(string, sizeof(string), "%s(%d) Has robbed $%d from Grotti",pname,playerid,mrand);
                        printf("%s", string);
                        format(string, sizeof(string), "~w~ROBBERY ~b~COMPLETE~n~~w~YOU ROBBED~n~~r~ $%d~n~~w~FROM Grotti", mrand);
                        GameTextForPlayer(playerid, string, 7000, 3);
                        new pcol = GetPlayerColor(playerid);
                        plwl = GetPlayerWantedLevel(playerid);
                        SendClientMessage(playerid, 0xA9A9A9AA, "|_Crime Commited_|");
                        format(string, sizeof(string), "(Grotti ROBBERY) Wanted Level %d",plwl);
                        SendClientMessage(playerid,pcol,string);
                        GivePlayerMoney(playerid, mrand);
                        oscore = GetPlayerScore(playerid);
                        AutoRobbed =1;
                        UsedAutoRecently[playerid] += 320;
                        SetPlayerScore(playerid, oscore +1);
                        if(robberrank[playerid] >=30 && robberrank[playerid] <=39)
                        {
                            SendClientMessage(playerid,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
                            robberrank[playerid] +=1;
                            commitedcrimerecently[playerid] +=360;
                        }
                        SetTimer("AutoRobbedRecent",70000,0);
                        for(new i=0;i<MAX_PLAYERS;i++)
                        {
                            if(LawEnforcementRadio[i] == 1)
                            {
                                new string1[256];
                                new string2[256];
                                new string3[256];
                                format(string1, sizeof(string1), "DISPATCH: (GROTTI ROBBERY) Grotti has been robbed. Suspect: %s(%d)", pname,playerid);
                                format(string2, sizeof(string2), "ALL UNITS: Please respond to the Grotti");
                                format(string3, sizeof(string3), "Type /radoff to turn your Law Enforcement radio off");
                                SendClientMessage(i, COLOR_ROYALBLUE, string1);
                                SendClientMessage(i, COLOR_ROYALBLUE, string2);
                                SendClientMessage(i, COLOR_DODGERBLUE, string3);
                            {
                            if(IsPlayerConnected(i))
                            {
                                GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                                if(GrottiOwner[i] == 1337)
                                {
                                    GetPlayerName(i,GrottiOwner,24);
                                    SendClientMessage(i, 0xA9A9A9AA, "|_Grotti Robbery_|");
                                    format(string, sizeof(string), "%s(%d) has robbed $%d from your Grotti",pname,playerid,mrand);
                                    SendClientMessage(i, 0x00C7FFAA, string);
                                    SendClientMessage(i, 0xA9A9A9AA, "If you're tired of losing money from your Grotti then use /sellgrotti(ID)");
                                    GivePlayerMoney(i,- mrand);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if(Current == GrottiBikesMenu) // 11774
    { // 11775
        TogglePlayerControllable(playerid, 1);
        switch(row)
        {
            case 0:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 99 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a BMX bike ($100)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(481, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a BMX Bike from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a BMX Bike from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(481, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a BMX bike from Grotti for $100");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a BMX bike from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(481, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a BMX bike from Grotti for $100");
                GivePlayerMoney(playerid,-100);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a BMX bike from Grotti ($100)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a BMX bike to %s(%d) - You receive $100",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $100 from a BMX bike sale",autoowner,i);
                        }
                    }
                }
            }
            case 1:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 89999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a FCR-900 ($90000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a FCR-900 from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a FCR-900 from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a FCR-900 from Grotti for $90000");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a FCR-900 from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a FCR-900 from Grotti for $90000");
                GivePlayerMoney(playerid,-90000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a FCR-900 from Grotti ($90000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a FCR-900 to %s(%d) - You receive $90000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,90000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $90000 from a FCR-900 sale",autoowner,i);
                        }
                    }
                }
            }
            case 2:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 139999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a NRG-500 motorbike ($140000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(522, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a NRG-500 from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a NRG-500 from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(522, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a NRG-500 motorbike from Grotti for $140000");
                GivePlayerMoney(playerid,-140000);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a NRG-500 motorbike from Grotti ($140000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a NRG-500 motorbike to %s(%d) - You receive $140000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,140000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $140000 from a NRG-500 motorbike sale",autoowner,i);
                        }
                    }
                }
            }
            case 3:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 74999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Freeway Bike ($75000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(463, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Freeway Bike from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Freeway Bike from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(463, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                UsedAutoRecently[playerid] += 90;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Freeway Bike vehicle from Grotti for $75000");
                GivePlayerMoney(playerid,-75000);
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Freeway bike car from Grotti ($75000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Freeway Bike vehicle to %s(%d) - You receive $75000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,75000);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $750000 from a Freeway Bike sale",autoowner,i);
                        }
                    }
                }
            }
            case 4:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 24999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Sanchez ($25000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Sanchez from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Sanchez from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Sanchez from Grotti for $25000");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Sanchez from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Sanchez from Grotti for $25000");
                GivePlayerMoney(playerid,-100);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Sanchez from Grotti ($25000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Sanchez to %s(%d) - You receive $25000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $25000 from a Sanchez sale",autoowner,i);
                        }
                    }
                }
            }
            case 5:
            {
                GrottiOwner[playerid]=dUserINT(PlayerName(playerid)).("GrottiOwner");
                if(GetPlayerMoney(playerid) <= 29999 && GrottiOwner[playerid] == 0)
                {
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchase Failed_|");
                    SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Quad ($30000)");
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Taken_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have taken a Quad from your Grotti");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Quad from his Grotti",buyername,playerid);
                    return 1;
                }
                if(GrottiOwner[playerid] == 1337)
                {
                    new boughtcar;
                    GetPlayerName(playerid,buyername,24);
                    boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                    BoughtCars[boughtcar] =999;
                    BoughtCarsOwner[boughtcar] =playerid;
                    SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                    SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Quad from Grotti for $30000");
                    UsedAutoRecently[playerid] += 90;
                    PutPlayerInVehicle(playerid, boughtcar, 0);
                    printf("**(CAR TAKEN)** %s(%d) has taken a Quad from his Grotti",buyername,playerid);
                    return 1;
                }
                new boughtcar;
                GetPlayerName(playerid,buyername,24);
                boughtcar = CreateVehicle(521, 570.1851,-1299.3229,16.9836,13.9434, -1, -1, 99999999999);
                BoughtCars[boughtcar] =999;
                BoughtCarsOwner[boughtcar] =playerid;
                SendClientMessage(playerid, 0xA9A9A9AA, "|_Vehicle Purchased_|");
                SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Quad from Grotti for $30000");
                GivePlayerMoney(playerid,-100);
                UsedAutoRecently[playerid] += 90;
                PutPlayerInVehicle(playerid, boughtcar, 0);
                printf("**(CAR PURCHASE)** %s(%d) has purchased a Quad from Grotti ($30000)",buyername,playerid);
                for(new i=0;i<MAX_PLAYERS;i++)
                {
                    if(IsPlayerConnected(i))
                    {
                        GrottiOwner[i]=dUserINT(PlayerName(i)).("GrottiOwner");
                        if(GrottiOwner[i] == 1337)
                        {
                            new autoowner[24];
                            GetPlayerName(i,autoowner,24);
                            SendClientMessage(i, 0xA9A9A9AA, "|_Vehicle Sold_|");
                            format(string, sizeof(string), "Grotti salesmen have sold a Quad to %s(%d) - You receive $30000",buyername,playerid);
                            SendClientMessage(i, 0x00C7FFAA, string);
                            SendClientMessage(i, 0x00C7FFAA, "You can sell the Grotti business to a player using /sellGrotti (id)");
                            GivePlayerMoney(i,100);
                            printf("**(CAR PURCHASE CASH)** Grotti owner %s(%d) has received $30000 from a Quad sale",autoowner,i);
                        }
                    }
                }
            }
            case 6:
            {
                ShowMenuForPlayer(GrottiMenu, playerid);
                return 1;
            }
        }
    }
    return 1;
}

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    else if(checkpointid == CPGrotti)
    {
        ShowMenuForPlayer(GrottiMenu, playerid);
        AbleToUseGrotti[playerid] = 1;
    }
}
Reply
#7

I do not see them yet but try deleteing the return 1; at the case's
Reply
#8

I've done all of that and still, no dice. The strange thing is that it's only these menus that cause the errors. I made another menu to test if I couldn't make any more and it worked perfectly.
Reply
#9

Mate please I Do not see the error LINES.
Reply
#10

Quote:
Originally Posted by Berlovan
Посмотреть сообщение
Mate please I Do not see the error LINES.
He marked the lines with "//"

pawn Код:
if(Current == GrottiBikesMenu) // 11774
    { // 11775
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)