11.12.2010, 06:08
Why remove the Mountain Bike? Just disable jumping, it's unrealistic and gives an unfair advantage to other players.
I tried to implement an anti-mountain bike jumping system. Here, I did some compiling here and there, and figured it out.
This SHOULD work completely, can't test right now, I'm somewhere where I'm restricted to download anything, even PAWN.
I tried to implement an anti-mountain bike jumping system. Here, I did some compiling here and there, and figured it out.
This SHOULD work completely, can't test right now, I'm somewhere where I'm restricted to download anything, even PAWN.
pawn Код:
#include <a_samp>
new DelayTimer;
forward DelayFreeze(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid) == 510))
{
if(GetPlayerState(playerid == PLAYER_STATE_DRIVER))
{
new Float:z_rot;
GetVehicleZAngle(GetPlayerVehicleID(playerid), z_rot);
SetVehicleZAngle(GetPlayerVehicleID(playerid), z_rot-4);
DelayTimer = SetTimer("DelayFreeze", 2000, false);
TogglePlayerControllable(playerid, 0);
return true;
}
else if(!GetVehicleModel(GetPlayerVehicleID(playerid) == 510))
{
SendClientMessage(playerid, 0xFFFFFFAA, "You are not in a Mountain Bike.");
return true;
}
else if(!GetPlayerState(playerid == PLAYER_STATE_DRIVER))
{
SendClientMessage(playerid, 0xFFFFFFAA, "You are not the driver.");
return true;
}
}
}
return true;
}
public DelayFreeze(playerid)
{
KillTimer(DelayTimer);
TogglePlayerControllable(playerid, 1);
return true;
}

