26.09.2016, 18:13
Hello all, i'm making faction cars but when i did the script, i saw some warnings ( 18 warnings exactly, yes, so many... ), but, the problem is, when I'm joining the game with pFaction variable 0, if i'm entering the faction car without specific faction, I don't get down from vehicle. A warning, that's why, or...? Down I will take some usefully stuff. Thanks.
Bye!
Code:
forward IsJobCar(vehicleid); stock IsJobCar(vehicleid) { new EQNCar[MAX_VEHICLES]; for(new i = 0; i < sizeof(EQNCar); i++) if(vehicleid == EQNCar[i]) return true; return false; }
*IsJobCar function
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(IsJobCar(vehicleid) && PlayerInfo[playerid][pFaction] != 4) { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid, -1, "{FFFFFF}Factiune invalida."); } return 1; }
*OnPlayerEnterVehicle functionMhm, if now I think, I must put GetVehicleID after OnPlayerEnterVehicle line?... I really don't know.
Bye!