12.11.2012, 10:29
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
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;
}