The topic he gave you is about sawn-off glitch.
Код:
public OnPlayerUpdate(playerid)
{
static wepState ;
wepState = GetPlayerWeaponState (playerid);
if( WEAPONSTATE_LAST_BULLET == wepState || wepState == WEAPONSTATE_MORE_BULLETS || WEAPONSTATE_RELOADING == wepState) {
return true;
}
static wepId ;
wepId = GetPlayerWeapon(playerid);
if ( wepId != SAWN_ OFFID ) {
SetPVarInt( playerid, "lastWeapon", wepId );
SetPVarInt( playerid, "lastTimewep", gettime() );
return true;
}
else {
if ( gettime() - GetPVarInt(playerid,"sawnoffPega") < 10 && gettime () - GetPVarInt( playerid, "lastTimewep") < 2 && GetPVarInt( playerid, "lastWeapon" ) != SAWN_ OFFID ) {
SetPVarInt( playerid, "lastWeapon", SAWN_ OFFID);
SetPVarInt( playerid, "lastTimewep", 0);
return true;
}
SetPVarInt( playerid, "sawnoffPega", gettime());
}
return true ;
}