public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
{
if( hittype != BULLET_HIT_TYPE_NONE ) // Bullet Crashing uses just this hittype
{
if( !( -1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0 ) ) // a valid offset, it's impossible that a offset bigger than 1000 is legit (also less than -1000.0 is impossible, not used by this hack, but still, let's check for it, just for the future, who knows what hacks will appear). The object with biggest offset is having ~700-800 radius.
{
BanEx(playerid, "WeaponCrash");
return 0; // let's desynchronize that bullet, so players won't crash
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(GetPlayerCameraMode(playerid) == 53)
{
new Float:kLibPos[3];
GetPlayerCameraPos(playerid, kLibPos[0], kLibPos[1], kLibPos[2]);
if ( kLibPos[2] < -50000.0 || kLibPos[2] > 50000.0 )
{
BanEx(playerid, "WeaponCrasher");
return 0;
}
}
return 1;
}
|
Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerCameraMode(playerid) == 53)
{
new Float:kLibPos[3];
GetPlayerCameraPos(playerid, kLibPos[0], kLibPos[1], kLibPos[2]);
if ( kLibPos[2] < -50000.0 || kLibPos[2] > 50000.0 )
{
BanEx(playerid, "WeaponCrasher");
return 0;
}
}
return 1;
}
|
|
realmente foi um erro meu , desculpe . vocк poderia me explicar oque esse cуdigo faz
|
|
Ele basicamente checa se a posiзгo Z do jogador й menor que -50000.0 ou maior que 50000.0, e se for ele bane o jogador.
Provalvemente, este deve ser o local que o jogador fica crashando os outros jogadores. Abraзos, |