31.08.2012, 23:49
alguйm sabe alguma forma de criar um anti 2-2-2?
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 ;
}
Tenta isto, boa sorte.
pawn Code:
|