Car Dealership
#1

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,doors,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;
}
Reply
#2

I dont know its the right command
Reply
#3

Anyone i have been waited 1 day to avoid Bump but noone answered.
Reply
#4

Can u show us the timer code?
Reply
#5

Ehm which one should i search for ?
Reply
#6

i mean in ctrl + f etc...
Reply
#7

Found anything?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)