29.09.2011, 21:56
All Vehicles are Locked out Its crazy I have the vehicles i want under gamemodeinit As
FiremanVehicle = AddStaticVehicle(407,833.9660,-2397.6414,13.3359,297.7759,3,3); // Firetruck
PoliceVehicle = AddStaticVehicle(596,1536.5144,-1668.5848,13.1911,22.6003,106,106); // lspd
But some reason every car on my gamemode is Police and fireman vehicles... its weird....
FiremanVehicle = AddStaticVehicle(407,833.9660,-2397.6414,13.3359,297.7759,3,3); // Firetruck
PoliceVehicle = AddStaticVehicle(596,1536.5144,-1668.5848,13.1911,22.6003,106,106); // lspd
But some reason every car on my gamemode is Police and fireman vehicles... its weird....
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { //===============================FireMan Vehicles=============================== new PrivateVehicles[24]; GetPlayerName(playerid, PrivateVehicles, sizeof(PrivateVehicles)); if(newstate == PLAYER_STATE_DRIVER) { new Vehicle = GetPlayerVehicleID(playerid); if(Vehicle == FiremanVehicle == PlayerInfo[playerid][pJob] >= 1) { if(strcmp(PrivateVehicles,"FiremanVehicle",true)) { SendClientMessage(playerid, 0x33AA33AA, "You Are Not On Fire Duty"); RemovePlayerFromVehicle(playerid); } } } //==============================Police Vehicles================================= GetPlayerName(playerid, PrivateVehicles, sizeof(PrivateVehicles)); if(newstate == PLAYER_STATE_DRIVER) { new Vehicle = GetPlayerVehicleID(playerid); if(Vehicle == PoliceVehicle == PlayerInfo[playerid][pJob] >= 2) { if(strcmp(PrivateVehicles,"PoliceVehicle",true)) { SendClientMessage(playerid, 0x33AA33AA, "You Are not On Police Duty"); RemovePlayerFromVehicle(playerid); } } }