KillTimer is not working
#1

I tried like 3 hours to fix it,but it not working.

Код HTML:
CMD:refuel(playerid, params[])
{
    if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
	    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;
       	RefuelingVehicleTimer[playerid] = SetTimerEx("ReFill", 1000, true, "i", playerid);
	}
	return 1;
}
Код HTML:
stock StopRefueling(playerid)
{
	GivePlayerCash(playerid, -RefuelingVehiclePrice[playerid]);

	new string[128];
	format(string, sizeof(string), "Your vehicle's tank has been refilled for $%d.", RefuelingVehiclePrice[playerid]);
	SendClientMessageEx(playerid, COLOR_WHITE,string);
	
	new mypoint = -1;
	for (new i=0; i<MAX_POINTS; i++)
		{
		if(strcmp(Points[i][Name], "Fossil Fuel Company", true) == 0)
		{
			mypoint = i;
		}
	}
	for(new i = 0; i < sizeof(FamilyInfo); i++)
	{
		if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
		{
			FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(RefuelingVehiclePrice[playerid]/10);
		}
			
		RefuelingVehicle[playerid] = 0; RefuelingVehiclePrice[playerid] = 0; KillTimer(RefuelingVehicleTimer[playerid]);
	}
	return true;
}
Reply


Messages In This Thread
KillTimer is not working - by Kenway - 19.08.2012, 12:20
Re: KillTimer is not working - by avivelkayam - 19.08.2012, 12:30
Re: KillTimer is not working - by Kenway - 19.08.2012, 12:37
Re: KillTimer is not working - by Kenway - 19.08.2012, 18:07
Re: KillTimer is not working - by MadeMan - 19.08.2012, 19:05
Re: KillTimer is not working - by Kenway - 19.08.2012, 19:21
Re: KillTimer is not working - by Kenway - 20.08.2012, 08:00

Forum Jump:


Users browsing this thread: 1 Guest(s)