View Full Version : Car Dealership

08/12/2013, 07:37 PM
when you create dealerships and make some cars for sale and everytime u buying the cars the script have to save and when it saves the server is kinda crashing like when u losing ur internet connection then u see all players tabbed. can u fix that so the script arent crashing? everytime u buying a car or deleting the car dealership and checking the server logs it says saving car dealership
can u fix it so it saving while its not crashing or something? i mean so players can play while it saving and not the server crashes while it saving and have to wait like 5-10 min.

And my other problem is when you type /refuel and when its done it keep taking 100$ it wont stop. I tried to relog it keep doing it. Even ban and unban it just wont stop. Can anyone help me with these?

Here is the /refuel cmd:

CMD:refuel(playerid, params[])
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
new vehicleid = GetPlayerVehicleID(playerid);
new RefuelingVehicleSlot = -1;
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);
if(engine == VEHICLE_PARAMS_ON) return SendClientMessageEx(playerid, COLOR_RED, "You need to shut off the engine before filling up (/car engine).");
if(!IsAtFuelStation(playerid)) return SendClientMessageEx(playerid, COLOR_RED, "You're not at a fuel station.");
if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_RED,"This vehicle doesn't need fuel.");
if(VehicleFuel[vehicleid] >= 100.0) return SendClientMessageEx(playerid, COLOR_RED, "This vehicle's tank is already full.");
if(RefuelingVehicle[playerid] == 1) return SendClientMessageEx(playerid, COLOR_RED, "You are refilling your vehicle's tank.");
SendClientMessageEx(playerid, COLOR_WHITE, "Refueling your vehicle's tank, please wait.");
RefuelingVehicle[playerid] = 1;

for(new vehicleslot = 0; vehicleslot < MAX_PLAYERVEHICLES; vehicleslot++)
if(IsPlayerInVehicle(playerid, PlayerVehicleInfo[playerid][vehicleslot][pvId]))
RefuelingVehicleSlot = vehicleslot;
RefuelingVehicleTimer[playerid] = SetTimerEx("ReFill", 1000, true, "ii", playerid, RefuelingVehicleSlot);
return 1;

08/12/2013, 08:04 PM
I dont know its the right command

09/12/2013, 02:37 PM
Anyone i have been waited 1 day to avoid Bump but noone answered.

newbie scripter
09/12/2013, 03:03 PM
Can u show us the timer code?

09/12/2013, 07:38 PM
Ehm which one should i search for ?

09/12/2013, 07:55 PM
i mean in ctrl + f etc...

09/12/2013, 08:41 PM
Found anything?