Error Compiling
#1

hello i have Problem
Code :
public VM_OnVehicleFire(vehicleid,slot)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
VM_OnPlayerKeyStateChange(playerid,newkeys);
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PlayerInfo[playerid][VipLevel] >= 1 && SpeedBoostMultiplier[playerid] >= 0.1)
{
if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
{
if (newkeys & KEY_FIRE)
{
new Float:vx, Float:vy, Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);

if (floatabs(vx) < 3 && floatabs(vy) < 3 && floatabs(vz) < 3)
{
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * SpeedBoostMultiplier[playerid], vy * SpeedBoostMultiplier[playerid], vz * SpeedBoostMultiplier[playerid]);
}
return 1;
}
}
}
if(newkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // <--------- Fire button, Click then INF NOS will works
{
if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
if(oldkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
if(newkeys & KEY_CROUCH)
{
if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
{
FlipAndRepair(playerid);
}
}
return 1;
}

pleaz help me

Error :
\pawno\include\VM.inc(125) : error 004: function "VM_OnVehicleFire" is not implemented
\pawno\include\VM.inc(151) : error 004: function "VM_OnVehicleFire" is not implemented
Reply
#2

Hello Scripter pleaz help me
Reply
#3

Just remove these functions: VM_OnVehicleFire.
Reply
#4

Some brackets were missing and some were extra.. Try this..
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	VM_OnPlayerKeyStateChange(playerid,newkeys);
	if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PlayerInfo[playerid][VipLevel] >= 1 && SpeedBoostMultiplier[playerid] >= 0.1)
	{
		if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
		{
			if (newkeys & KEY_FIRE)
			{
				new Float:vx, Float:vy, Float:vz;
				GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
				if (floatabs(vx) < 3 && floatabs(vy) < 3 && floatabs(vz) < 3)
				{
					SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * SpeedBoostMultiplier[playerid], vy * SpeedBoostMultiplier[playerid], vz * SpeedBoostMultiplier[playerid]);
				}
				return 1;
			}
		}
	}
	if(newkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) // <--------- Fire button, Click then INF NOS will works
	{
		if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
		{
			AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
		}
	}
	if(oldkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
		if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
		{
			AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
		}
		if(newkeys & KEY_CROUCH)
		{
			if(GetPlayerVirtualWorld(playerid) != 7 && GetPlayerVirtualWorld(playerid) != 6)
			{
				FlipAndRepair(playerid);
			}
		}
	}
	return 1;
}
I dunno if I messed everything up.. It was really hard to read the code when u failed to use code
http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf can come in handy.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)