How i can do
#1

how i can do..
to get loaded..
at nearly place.??
can help...

Код:
if(strcmp(cmdtext, "/work", true) == 0)
        {
            if (GetPVarInt(playerid, "Flight") == 1)
            {
                return SendClientMessage(playerid, COLOR_RED, "You are already in a flight!");
                }

                if (GetPVarInt(playerid, "Work") > 0)
                {
                    return SendClientMessage(playerid, COLOR_RED, "You are already in a work!");
                }

                new IslandName[48], szString[128];
                SetPVarInt(playerid, "Work", 1);
                MissionVehicle[playerid] = GetPlayerVehicleID(playerid);
                switch (random(12))
                {
                    case 0: {
                    Island[PopCorn_Island][playerid]=SetPlayerFlightCheckpoint(playerid, 3364.3716,187.7556,3.7580, 10.0);
                    IslandName="PopCorn Island"; }
                    case 1: {
                    Island[Las_Venturas][playerid]=SetPlayerFlightCheckpoint(playerid, 1476.5433,1465.9758,10.8281, 10.0);
                    IslandName="Las Venturas"; }
                    case 2: {
                    Island[Island_1][playerid] = SetPlayerFlightCheckpoint(playerid, -3573.7981,-313.6209,12.8887, 10.0);
                    IslandName="Island 1"; }
                    case 3: {
                    Island[Los_Santos][playerid] = SetPlayerFlightCheckpoint(playerid, 1869.8599,-2493.2256,13.5547, 10.0);
                    IslandName="Los Santos"; }
                    case 4: {
            Island[San_Fierro][playerid] = SetPlayerFlightCheckpoint(playerid, -1437.0648,48.4609,14.1484, 10.0);
            IslandName="San Fierro"; }
            case 5: {
            Island[Verdant_Meadows][playerid] = SetPlayerFlightCheckpoint(playerid, 270.4283,2507.4309,16.4944, 10.0);
            IslandName="Verdant Meadows"; }
            case 6: {
            Island[Pilot_Island][playerid] = SetPlayerFlightCheckpoint(playerid, -84.6720,3357.0527,4.2387, 10.0);
            IslandName="Pilots Island"; }
            case 7: {
            Island[Admin_Island][playerid] = SetPlayerFlightCheckpoint(playerid, 818.3096,-4558.7163,1.2266, 10.0);
            IslandName="Admin Island"; }
            case 8: {
            Island[PopCorn_Mansion][playerid] = SetPlayerFlightCheckpoint(playerid, 3275.1458,-1819.7595,2.0000, 10.0);
            IslandName="PopCorn Island"; }
            case 9: {
            Island[Rock_Island][playerid] = SetPlayerFlightCheckpoint(playerid, 3428.0107,-683.0929,4.4299, 10.0);
            IslandName="Rock Island"; }
            case 10: {
            Island[Bubbles_Island][playerid] = SetPlayerFlightCheckpoint(playerid, 5798.8726,-1556.8759,4.9581, 10.0);
            IslandName="Bubbles Island"; }
            case 11: {
                        Island[Communist_AP][playerid] = SetPlayerFlightCheckpoint(playerid, -1481.1166,3129.1453,19.3932, 10.0);
                        IslandName="Communist Airport"; }
                }

                FirstAPName[playerid] = IslandName;
                format(szString, 128, "Go to %s to pick up the passengers!", IslandName);

        WorkTimer[playerid] = SetTimerEx("WorkingMinutes", 60000, true, "i", playerid);
                SendClientMessage(playerid, COLOR_LIGHTGREEN, szString);
                return 1;
        }

        if(strcmp(cmdtext, "/refuel", true) == 0)
        {
                if (IsAtRefuelSpot(playerid))
                {
                        new v = GetPlayerVehicleID(playerid);
                        if (v)
                        {
                            if (GetPlayerMoney(playerid) >= 400)
                            {
                                        if (Gas[v] > 95)
                                        {
                                                return SendClientMessage(playerid, COLOR_RED, "Your tank is already full");
                                        }
                                        Gas[v] = 100;
                                        GivePlayerMoney(playerid, -400);
                                        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your vehicle has been refilled [Cost: $400]");
                                        return 1;
                                }
                                else return SendClientMessage(playerid, COLOR_RED, "You need $400 to do this");
                        }
                        else return SendClientMessage(playerid, COLOR_RED, "You are not in any vehicle");
                }
                else return SendClientMessage(playerid, COLOR_RED, "You must be in a Red Flag (Refuel/Repair Station)");
        }

        if(strcmp(cmdtext, "/repair", true) == 0)
        {
                if (IsAtRefuelSpot(playerid))
                {
                        new v = GetPlayerVehicleID(playerid);
                        if (v)
                        {
                            if (GetPlayerMoney(playerid) >= 350)
                            {
                                        RepairVehicle(v);
                                        GivePlayerMoney(playerid, -350);
                                        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your vehicle has been refilled [Cost: $350]");
                                        return 1;
                                }
                                else return SendClientMessage(playerid, COLOR_RED, "You need $350 to do this");
                        }
                        else return SendClientMessage(playerid, COLOR_RED, "You are not in any vehicle");
                }
                else return SendClientMessage(playerid, COLOR_RED, "You must be in a Red Flag (Refuel/Repair Station)");
        }

        if(strcmp(cmdtext, "/setrt", true) == 0)
        {
                new vehicleid = GetPlayerVehicleID(playerid);
                if(IsAirVehicle(vehicleid))
                {
                        if (GetPVarInt(playerid, "CanSetRoute") == 1)
                    {
                                SendClientMessage(playerid, COLOR_RED2, "Once you have set your destination fly to the red dot on your map!");
                                ShowPlayerDialog(playerid, 123,DIALOG_STYLE_LIST, "Set your Route!", "Nub Island(Small)\nIsland 1(Large)\n \nLas Venturas Airport(Medium)\nLos Santos(Medium)\nSan Fierro(Large)\nSan Fierro Carrier(Tiny)\nArea 69(Small)\nVerdent Meadows(Big)\nPilot's Island(Big)\nAdmin's Island(Medium)\nStrip Island(Long)\nHunterville(Tiny Strip)\nRayush Base(Medium Strip)\nCampers Field(Tiny Strip)\nDestruction Field(Medium Field)(/enter, /exit interiors)\n(Page 2)", "Enter", "Cancel");
                        }
                        else
                        {
                                return SendClientMessage(playerid, COLOR_RED, "You must wait again to do this command!");
                        }
                        if (GetPVarInt(playerid, "Flight") == 1)
                        {
                            return SendClientMessage(playerid, COLOR_RED, "You are already in a flight");
                        }
                }
                else
                {
                        SendClientMessage(playerid, COLOR_RED2, "You are not in a Aircraft");
                }
                return 1;
        }
Reply


Messages In This Thread
How i can do - by ejul - 25.07.2012, 12:21

Forum Jump:


Users browsing this thread: 2 Guest(s)