14.09.2016, 02:19
Quote:
Copy server.cfg from the main directory and paste it in pawno folder.
Rename it to pawn.cfg and open it. Remove everything and write -d3 in it. Run pawno.exe, open the script and compile it. Start the server and let it create those vehicles and respawn them. Post the new logs. If you still get the exact same logs (means you did something wrong with the guide above), just post OnVehicleSpawn callback. |
Code:
public OnVehicleSpawn(vehicleid) { VehicleStatus{vehicleid} = 0; TruckContents[vehicleid] = 0; VehicleRadioStation[vehicleid] = 0; for(new i = 0; i < sizeof(FamilyInfo); i++) { for(new d = 0 ; d < MAX_GANG_VEHICLES; d++) { if(FamilyVehicleInfo[i][d][fvLocked] != 0 && FamilyVehicleInfo[i][d][fvLock] > 0) LockGangVehicle(i, FamilyVehicleInfo[i][d][fvId], FamilyVehicleInfo[i][d][fvLock]); } } switch(GetVehicleModel(vehicleid)) { case 427, 428, 432, 601, 528: SetTimerEx("DelayedVehHealth", 1000, false, "d", vehicleid); } new v; foreach(Player, i) { v = GetPlayerVehicle(i, vehicleid); if(v != -1) { if(PlayerVehicleInfo[i][v][pvId] == vehicleid && GetVehicleModel(vehicleid) != PlayerVehicleInfo[i][v][pvModelId]) { DestroyVehicle(vehicleid); VehicleRadioStation[vehicleid] = 0; PlayerVehicleInfo[i][v][pvId] = CreateVehicle(PlayerVehicleInfo[i][v][pvModelId], PlayerVehicleInfo[i][v][pvPosX], PlayerVehicleInfo[i][v][pvPosY], PlayerVehicleInfo[i][v][pvPosZ], PlayerVehicleInfo[i][v][pvPosAngle],PlayerVehicleInfo[i][v][pvColor1], PlayerVehicleInfo[i][v][pvColor2], -1); if(PlayerVehicleInfo[i][v][pvLocked] == 1) LockPlayerVehicle(i, PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvLock]); ChangeVehiclePaintjob(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvPaintJob]); ChangeVehicleColor(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvColor1], PlayerVehicleInfo[i][v][pvColor2]); for(new m = 0; m < MAX_MODS; m++) { if(PlayerVehicleInfo[i][v][pvMods][m] >= 1000 && PlayerVehicleInfo[i][v][pvMods][m] <= 1193) { if(InvalidModCheck(GetVehicleModel(vehicleid), PlayerVehicleInfo[i][v][pvMods][m])) { AddVehicleComponent(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvMods][m]); } else { //printf("Removing invalid mod %d from %d of %s", PlayerVehicleInfo[i][v][pvMods][m], GetVehicleModel(vehicleid), GetPlayerNameEx(i)); PlayerVehicleInfo[i][v][pvMods][m] = 0; } } } } else { ChangeVehiclePaintjob(vehicleid, PlayerVehicleInfo[i][v][pvPaintJob]); ChangeVehicleColor(vehicleid, PlayerVehicleInfo[i][v][pvColor1], PlayerVehicleInfo[i][v][pvColor2]); for(new m = 0; m < MAX_MODS; m++) { if(PlayerVehicleInfo[i][v][pvMods][m] >= 1000 && PlayerVehicleInfo[i][v][pvMods][m] <= 1193) { if(InvalidModCheck(GetVehicleModel(vehicleid), PlayerVehicleInfo[i][v][pvMods][m])) { AddVehicleComponent(PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvMods][m]); } else { //printf("Removing invalid mod %d from %d of %s", PlayerVehicleInfo[i][v][pvMods][m], GetVehicleModel(vehicleid), GetPlayerNameEx(i)); PlayerVehicleInfo[i][v][pvMods][m] = 0; } } } if(PlayerVehicleInfo[i][v][pvLocked] == 1) LockPlayerVehicle(i, PlayerVehicleInfo[i][v][pvId], PlayerVehicleInfo[i][v][pvLock]); } new string[128]; format(string,sizeof(string),"Your %s has been sent to the location at which you last parked it.",GetVehicleName(vehicleid)); SendClientMessage(i, COLOR_GRAD1, string); } } if(LockStatus[vehicleid]) { foreach(Player, i) { if(PlayerInfo[i][pLockCar] == vehicleid) { PlayerInfo[i][pLockCar] = INVALID_VEHICLE_ID; } } } if(VehicleBomb{vehicleid} == 1) { foreach(Player, i) { if(PlayerInfo[i][pFaction] == 4 || PlayerInfo[i][pLeader] == 4) { if(PlacedVehicleBomb[i] == vehicleid) { VehicleBomb{vehicleid} = 0; PlacedVehicleBomb[i] = INVALID_VEHICLE_ID; PickUpC4(i); PlayerInfo[i][pC4Used] = 0; PlayerInfo[i][pC4Get] = 1; } } } } return 1; }