09.05.2014, 17:27
Hello Guys, yes ist me againD
now after ive got that that all vehicles having about 10000 health, i want that every car ive (or someoneelse..) bought also got bout 10000 health. (coz as you know, if you buy a veh ist not a callback..)
i have tried a few Things like SetVehicleToRespawn(freeid); etc but nothing helped and ive also tryd over a settimer :/
The Script is a part of the Advanced Vehicle System's Filterscript
/EDIT This is when ur about to buy a vehicle and it spawns right to u:
now after ive got that that all vehicles having about 10000 health, i want that every car ive (or someoneelse..) bought also got bout 10000 health. (coz as you know, if you buy a veh ist not a callback..)
i have tried a few Things like SetVehicleToRespawn(freeid); etc but nothing helped and ive also tryd over a settimer :/
The Script is a part of the Advanced Vehicle System's Filterscript
/EDIT This is when ur about to buy a vehicle and it spawns right to u:
Код:
GivePlayerMoney(playerid, -VehicleValue[id]); new dealerid = strval(VehicleOwner[id]); VehicleCreated[freeid] = VEHICLE_PLAYER; VehicleModel[freeid] = VehicleModel[id]; VehiclePos[freeid] = DealershipPos[dealerid]; VehicleColor[freeid] = VehicleColor[id]; VehicleInterior[freeid] = VehicleInterior[id]; VehicleWorld[freeid] = VehicleWorld[id]; VehicleValue[freeid] = VehicleValue[id]; GetPlayerName(playerid, VehicleOwner[freeid], sizeof(VehicleOwner[])); VehicleNumberPlate[freeid] = DEFAULT_NUMBER_PLATE; for(new d=0; d < sizeof(VehicleTrunk[]); d++) { VehicleTrunk[freeid][d][0] = 0; VehicleTrunk[freeid][d][1] = 0; } for(new d=0; d < sizeof(VehicleMods[]); d++) { VehicleMods[freeid][d] = 0; } VehiclePaintjob[freeid] = 255; VehicleLock[freeid] = 0; VehicleAlarm[freeid] = 0; UpdateVehicle(freeid, 0); SaveVehicle(freeid); new msg[128]; format(msg, sizeof(msg), "You have bought this vehicle for $%d", VehicleValue[id]); SendClientMessage(playerid, COLOR_WHITE, msg); RemovePlayerFromVehicle(playerid);