ShowPlayerDialog /findcar[Please help]
#7

Sir can you fix this code in this
pawn Код:
if(strcmp(cmd, "/findcar", true) == 0) // By DraGoN
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "Example: /findcar [Card slot id 1 or 2]");
                return 1;
            }
            new number = strval(tmp);
            if(number < 1 || number > 3)
                {
                    SendClientMessage(playerid, COLOR_GREY, "Vehicle id 1 or 2.");
                    return 1;
                }
            if(number == 1)
            {
                if(PlayerInfo[playerid][pPcarkey] == 9999)
                {
                    SendClientMessage(playerid, COLOR_GREY, "No Vehicle in this car!");
                    return 1;
                }
                new carid = PlayerInfo[playerid][pPcarkey];
                new Float:X, Float:Y, Float:Z;
                new zone[MAX_ZONE_NAME];
                GetVehicle2DZone(carid, zone, MAX_ZONE_NAME);
                GetVehiclePos(carid, X,Y,Z);
                if(Searching[playerid] == 0)
                {
                    Searching[playerid] = 1;
                    SetPlayerCheckpoint(playerid, X,Y,Z, 5.0);
                    format(string, sizeof(string),"Your cars are marked on the map (red marker), located in the zone %s!",zone);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                }
                else
                {
                    SetPlayerCheckpoint(playerid, X,Y,Z, 5.0);
                    format(string, sizeof(string),"Your cars are marked on the map (red marker), located in the zone %s!",zone);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                }
            }

            else if(number == 2)
            {
                if(PlayerInfo[playerid][pPcarkey3] == 9999)
                {
                    SendClientMessage(playerid, COLOR_GREY, "No Vehicle in this car");
                    return 1;
                }
                new carid = PlayerInfo[playerid][pPcarkey2];
                new Float:X, Float:Y, Float:Z;
                new zone[MAX_ZONE_NAME];
                GetVehicle2DZone(carid, zone, MAX_ZONE_NAME);
                GetVehiclePos(carid, X,Y,Z);
                if(Searching[playerid] == 0)
                {
                    Searching[playerid] = 1;
                    SetPlayerCheckpoint(playerid, X,Y,Z, 5.0);
                    format(string, sizeof(string),"Your cars are marked on the map (red marker), located in the zone %s!",zone);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                }
                else
                {
                    SetPlayerCheckpoint(playerid, X,Y,Z, 5.0);
                    format(string, sizeof(string),"Your cars are marked on the map (red marker), located in the zone %s!",zone);
                    SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
                }
            }
        }
        return 1;
    }
Reply


Messages In This Thread
ShowPlayerDialog /findcar[Please help] - by kingchandio - 12.07.2011, 06:39
Re: ShowPlayerDialog /findcar[Please help] - by [MG]Dimi - 12.07.2011, 06:41
Re: ShowPlayerDialog /findcar[Please help] - by kingchandio - 12.07.2011, 06:57
Re: ShowPlayerDialog /findcar[Please help] - by [MG]Dimi - 12.07.2011, 07:26
Re: ShowPlayerDialog /findcar[Please help] - by kingchandio - 12.07.2011, 09:19
Re: ShowPlayerDialog /findcar[Please help] - by [MG]Dimi - 12.07.2011, 09:23
Re: ShowPlayerDialog /findcar[Please help] - by kingchandio - 23.07.2011, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)