25.12.2010, 21:04
Oke, with this filterscript bug with shooting from car with pistols fixed: when you shoot with any pistol server freezes you for 2 second. Non tested, srry.
sorry for bad tab, forum fail.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_FIRE )
{
if( IsPlayerInAnyVehicle( playerid ) && GetPlayerState( playerid ) == PLAYER_STATE_PASSEENGER )
{
if( GetPlayerWeapon( playerid ) == 24 || GetPlayerWeapon( playerid ) == 23 || GetPlayerWeapon( playerid ) == 22 )
{
if( GetPVarInt( playerid, "Freezed" ) == 0 )
{
SetTimerEx( "Unfreeze", 2000, false, "d", playerid );
TogglePlayerControllable( playerid, false );
SetPVarInt( playerid, "Freezed", 1 );
}
}
}
}
return 1;
}
forward Unfreeze( playerid );
public Unfreeze( playerid )
{
TogglePlayerContrllable( playerid, false );
SetPVarInt( playerid, "Freezed", 0 );
return true;
}
sorry for bad tab, forum fail.