Car wont get thrown
#1

The car isn't getting throwed!!!
But it do spawns and gets removed by its time after being exploded. but dosent throws!
Code:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	new Float:xx, Float:xy, Float:xz;
	if(PRESSED(KEY_FIRE))
	{
	    if(throwing[playerid] == 1)
	    {
			new Float:vx, Float:vy, Float:vz, Float:vangle, color1, color2, respawn_delay;
			color1 = random(256), color2 = random(256), respawn_delay = -1;
			GetPlayerPos(playerid, vx, vy, vz);
			GetPlayerFacingAngle(playerid, vangle);
			new throwveh = CreateVehicle(402, Float:vx, Float:vy, Float:vz, Float:vangle, color1, color2, respawn_delay);
   			GetVehicleVelocity(throwveh, xx, xy, xz);
			SetVehicleVelocity(throwveh, xx+(xx / 5), xy+(xy / 5), xz+(xz / 5));
			SetVehicleHealth(throwveh, 150.0);
			SetTimerEx("RemoveVehicle", 6500, false, "d", throwveh);
		}
	}
	if(HOLDING(KEY_FIRE))
	{
 		if(throwing[playerid] == 1)
	    {
			ThrowingV[playerid] = SetTimerEx("ThrowingVeh", 1250, true, "d", playerid);
		}
	}
	else if(RELEASED(KEY_FIRE))
	{
	    if(throwing[playerid] == 1)
	    {
	    	KillTimer(ThrowingV[playerid]);
		}
	}
	return 1;
}

public ThrowingVeh(playerid)
{
            new Float:xx, Float:xy, Float:xz;
    		new Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay;
			color1 = random(256), color2 = random(256), respawn_delay = -1;
			GetPlayerPos(playerid, x, y, z);
			GetPlayerFacingAngle(playerid, angle);
			new throwveh = CreateVehicle(402, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay);
   			GetVehicleVelocity(throwveh, xx, xy, xz);
			SetVehicleVelocity(throwveh, xx+(xx / 4), xy+(xy / 4), xz+(xz / 4));
			SetVehicleHealth(throwveh, 150.0);
			SetTimerEx("RemoveVehicle", 6500, false, "d", throwveh);
			return 1;
}
Reply


Messages In This Thread
Car wont get thrown - by MafiaOink - 20.03.2015, 08:32
Re: Car wont get thrown[URGENT] - by MafiaOink - 20.03.2015, 09:20
Re: Car wont get thrown - by MafiaOink - 20.03.2015, 11:10
Re: Car wont get thrown - by CalvinC - 20.03.2015, 11:19
Re: Car wont get thrown - by MafiaOink - 20.03.2015, 11:52
Re: Car wont get thrown - by Gammix - 20.03.2015, 11:59
Re: Car wont get thrown - by MafiaOink - 16.07.2016, 17:52

Forum Jump:


Users browsing this thread: 1 Guest(s)