07.09.2012, 15:53
We have noticed in my server that Players are not moving in their Screen, but they could Run,Walk,Shoot and other movements.
I have already check OnPlayerUpdate returning 1
Do you think this cause the problem?
or this
Last
I have already check OnPlayerUpdate returning 1
Do you think this cause the problem?
Код:
/* =============================== */ /* stuntman's Anti-Money Cheat */ /* =============================== */ stock sGetPlayerMoney( playerid ) return GetPVarInt( playerid, "sMoney" ); //Anti-cheat - Get Player Moneys stock sGivePlayerMoney( playerid, sMoneyV ) //Anti-cheat - Give Player Moneys { SetPVarInt( playerid, "sMoney", GetPVarInt( playerid, "sMoney" ) + sMoneyV ); return GivePlayerMoney( playerid, sMoneyV ); } stock sResetPlayerMoney( playerid ) //Anti-cheat - Reset Player Moneys { SetPVarInt( playerid, "sMoney", 0 ); return ResetPlayerMoney( playerid ); } //=================[ Check moneys ]=================== public OnPlayerUpdate( playerid ) { if( GetPlayerMoney( playerid ) != GetPVarInt( playerid, "sMoney" ) ) { ResetPlayerMoney( playerid ); GivePlayerMoney( playerid, GetPVarInt( playerid, "sMoney" ) ); } return CallLocalFunction( "samc_OnPlayerUpdate", "i", playerid ); } #if defined _ALS_OnPlayerUpdate #undef OnPlayerUpdate #else #define _ALS_OnPlayerUpdate #endif #define OnPlayerUpdate samc_OnPlayerUpdate forward samc_OnPlayerUpdate( playerid ); //==================================================== #define GetPlayerMoney sGetPlayerMoney #define GivePlayerMoney sGivePlayerMoney #define ResetPlayerMoney sResetPlayerMoney
Код:
public OnPlayerUpdate( playerid ) { static Float: X, Float: Y, Float: Z, Float: vX, Float: vY, Float: vZ ; GetPlayerPos( playerid, X, Y, Z ); if( X >= 99999.0 || Y >= 99999.0 || Z >= 99999.0 || X <= -99999.0 || Y <= -99999.0 || Z <= -99999.0 ) { SendClientMessage( playerid, 0xa9c4e4ff, "Warning: Excessive X, Y, Z has been breached thus last location set." ); SetPlayerPos( playerid, g_cleoData[ playerid ] [ E_PB_X ], g_cleoData[ playerid ] [ E_PB_Y ], g_cleoData[ playerid ] [ E_PB_Z ] ); } else { g_cleoData[ playerid ] [ E_PB_X ] = X; g_cleoData[ playerid ] [ E_PB_Y ] = Y; g_cleoData[ playerid ] [ E_PB_Z ] = Z; } if( IsPlayerInAnyVehicle( playerid ) && GetPlayerState( playerid ) == PLAYER_STATE_DRIVER ) { GetPlayerPos( playerid, X, Y, Z ); GetVehicleVelocity( GetPlayerVehicleID( playerid ), vX, vY, vZ ); if( ( vX > 3.0 || vY > 3.0 || vZ > 3.0 || vX < -3.0 || vY < -3.0 || vZ < -3.0 ) && ( vX != X && vY != Y && vZ != Z ) ) { CallLocalFunction( "OnPlayerCleoDetected", "dd", playerid, CLEO_CARSWING ); } } return ( FC_OPU ) ? CallLocalFunction( "FC_OnPlayerUpdate", "d", playerid ) : 1; }
Код:
public OnPlayerUpdate(playerid) { new iVehicle = GetPlayerVehicleID(playerid) ; if(GetPlayerVehicleSeat(playerid) != 0) { if(GetPVarInt(playerid, "#ultimoveiculo") != iVehicle) { SetPVarInt(playerid, "#ultimoveiculo", iVehicle); if(GetVehicleModel(iVehicle)) { @ChangeVehicles(playerid, PLAYER_STATE_DRIVER, iVehicle); } } } if(funcidx("flood_controlOnPlayerUpdate") != -1) { return CallLocalFunction("flood_controlOnPlayerUpdate", "i", playerid); } return true; }