Need help Done All i could
#1

I created 2 jobs Fireman and Police and I made Private vehicles for the jobs What I ask a along time ago how to make it count the vehicles So i didnt half to do every code for ever vehicle so i can just PASTE more and Compile But What Im getting im trying to get as is one job is Hitting every car on the server Like public cars and Other jobs Like Im on Fireman job.. I jump into a firetruck it let me drive it i jump in a cop vehicle on fire job It Spams my screen with Your Not A Fireman and ejects me instead it calling on the cop one If Im not on either job I jump it any vehicle it kicks me out tells me Your Not A Fireman.. heres my code I hope You all under stand me Sorry if you didnt ...

Thanks n Advance

pawn Код:
//===============================FireMan Vehicles===============================
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new count;
        new Vehicle = GetPlayerVehicleID(playerid);
        for(new FV=0; FV != 12; FV++)
        {
            if( Vehicle == FiremanVehicle[FV] && PlayerInfo[playerid][pFireTeam] == 2)
            {
                 format(string, sizeof(string), "You Entered A %s, Owned By ARFD", VehicleNames[GetVehicleModel(Vehicle) -400]);
                 SendClientMessage(playerid, LIGHTRED, string);
            }
            else
            {
                SendClientMessage(playerid, 0x33AA33AA, "You're Not A Fireman");
                RemovePlayerFromVehicle(playerid);

            }
            count ++;
        }
        return count;
    }
//==============================Police Vehicles=================================
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new count;
        new Vehicle = GetPlayerVehicleID(playerid);
 
        for(new PV=0; PV != 11; PV++)
        {

            if( Vehicle == PoliceVehicle[PV] && PlayerInfo[playerid][pPoliceTeam] == 3)
            {
                format(string, sizeof(string), "You Entered A %s, Owned By SAPD", VehicleNames[GetVehicleModel(Vehicle) -400]);
                SendClientMessage(playerid, LIGHTBLUE, string);
            }
            else
            {
                SendClientMessage(playerid, 0x33AA33AA, "You're Not A Cop");
                RemovePlayerFromVehicle(playerid);

            }
            count ++;
        }
        return count;
    }
Reply
#2

You need to be Fireman of rank/level 2 and cop of rank/level 3. It is used '==' which means equal to.
Use '>=' which means greater than or equal to.
Reply
#3

That dont work The code works its just interfering with my other code its making all jobs vehicles to fireman job
Reply
#4

Help Me Please someone......
Reply
#5

BUMP!!!!!!!!!!!!!!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)