21.11.2014, 13:18
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
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