Small script problem
#1

I have this /vfixveh script, which works fine apart from the last timer not working.
here is the code:
Код:
CMD:vfixveh(playerid, params[])
{
	new vip[MAX_PLAYER_NAME], string[128], Float:health;
	
	new FVTime = tickcount() - 180000;
	
	FixvehTimer[playerid] = GetTickCount();
	TimerInfo[playerid][CMD_vfixveh] = tickcount();
	
	if(Player[playerid][pVip] < 2)
	{
		SCM(pid, ADMIN_COLOR, ADMIN_MESSAGE);
		return 1;
	}
	
	new vehicleid = GetPlayerVehicleID(playerid);
	new vehicleHp = GetVehicleHealth(playerid, health);
	
	GetPlayerName(playerid, vip, sizeof(vip));
	
	if(vehicleHp == 1000)
	{
		SCM(pid, ADMIN_COLOR, " Your vehicle is already at full hp!");
		return 1;
	}
	
	if(!IsPlayerInAnyVehicle(playerid))
	{
		SCM(pid, ADMIN_COLOR, " You are not in any vehicle.");
		FVTime = tickcount() - 180000;
		return 1;
	}
	if( GetTickCount() - FixvehTimer[playerid] < 180000 )
	{
		RepairVehicle(vehicleid);
		SCM(pid, -1, " {74FF5C}You have fixed your vehicle! You'll be able to use this command again after 3 minutes.");
		format(string, sizeof(string), "{EB4255}[VIP CMD] VIP Player %s has repaired his vehicle.", vip);
		SendManagerMessage(-1, string);
		SetTimerEx("EndFixvehTimer", 180000, false, "i", playerid);	
		return 1;
	}
	else
	{	
		if(FVTime < TimerInfo[playerid][CMD_vfixveh])  
		{
			SCM(pid, -1, "{F71B9C} You can only use this command every 3 minutes.");
			return 1;
		}	
	}
	return 1;
}
the red part of the code does not work - the timer never shows.
Reply


Messages In This Thread
Small script problem - by JXF - 24.06.2016, 20:11
Re: Small script problem - by F1N4L - 24.06.2016, 20:22
Re: Small script problem - by jlalt - 24.06.2016, 20:31
Re: Small script problem - by JXF - 24.06.2016, 20:48
Re: Small script problem - by IceBilizard - 25.06.2016, 04:15
Re: Small script problem - by JXF - 25.06.2016, 10:57
Re: Small script problem - by Sjn - 25.06.2016, 11:36
Re: Small script problem - by Sew_Sumi - 25.06.2016, 12:15
Re: Small script problem - by JXF - 28.06.2016, 16:34

Forum Jump:


Users browsing this thread: 2 Guest(s)