[Ajuda] ERRO me ajudem a concerta
#1

oq devo fazer. Linhas Adicionadas.

ERRO
Код:
CBD.pwn(1997) : warning 219: local variable "PosX" shadows a variable at a preceding level
CBD.pwn(1997) : warning 219: local variable "PosY" shadows a variable at a preceding level
CBD.pwn(1997) : warning 219: local variable "PosZ" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Codigo
Код:
// SpeedHack
forward AntiSH(); //aki
public AntiSH() //aki
{
    for(new i=0,j=GetMaxPlayers();i<=j;i++) 
    {
        if(GetSpeedKM(i) > 350) Ban(i); //Mudanзa
    }
    return 1;
}

// Velocimetro
stock GetVehicleSpeed(playerid)
{
    if(!IsPlayerInAnyVehicle(playerid)) return 1;
    new Float:vPos[3];
    GetVehicleVelocity(GetPlayerVehicleID(playerid), vPos[0], vPos[1], vPos[2]);
    return floatround((floatmul(floatsqroot(floatpower(vPos[0], 2.0) + floatpower(vPos[1], 2.0) + floatpower(vPos[2], 2.0)), 100.0) / 0.4463), floatround_floor);
}

stock GetSpeedKM(playerid)
{
    new Float:PosX,Float:PosY,Float:PosZ,Float:PlayerSpeedDistance;
    GetVehicleVelocity(GetPlayerVehicleID(playerid), PosX, PosY, PosZ);
    PlayerSpeedDistance = floatmul(floatsqroot(floatadd(floatadd(floatpower(PosX, 2), floatpower(PosY, 2)),  floatpower(PosZ, 2))), 170.0);
    new spe = floatround(PlayerSpeedDistance * 1);
    return spe;
}
Reply
#2

PHP код:
// SpeedHack
forward AntiSH(); //aki
public AntiSH() //aki
{
    for(new 
i=0,j=GetMaxPlayers();i<=j;i++) 
    {
        if(
GetSpeedKM(i) > 350Ban(i); //Mudanзa
    
}
    return 
1;
}

// Velocimetro
stock GetVehicleSpeed(playerid)
{
    if(!
IsPlayerInAnyVehicle(playerid)) return 1;
    new 
Float:vPos[3];
    
GetVehicleVelocity(GetPlayerVehicleID(playerid), vPos[0], vPos[1], vPos[2]);
    return 
floatround((floatmul(floatsqroot(floatpower(vPos[0], 2.0) + floatpower(vPos[1], 2.0) + floatpower(vPos[2], 2.0)), 100.0) / 0.4463), floatround_floor);
}

stock GetSpeedKM(playerid)
{
    new 
Float:PosXv,Float:PosYv,Float:PosZv,Float:PlayerSpeedDistance;
    
GetVehicleVelocity(GetPlayerVehicleID(playerid), PosXvPosYvPosZv);
    
PlayerSpeedDistance floatmul(floatsqroot(floatadd(floatadd(floatpower(PosXv2), floatpower(PosYv2)),  floatpower(PosZv2))), 170.0);
    new 
spe floatround(PlayerSpeedDistance 1);
    return 
spe;

resolvido
Reply
#3

POSSIVEL O SPEED HACK FUNCIONAR ?
Reply
#4

Quote:
Originally Posted by VinnyScript
Посмотреть сообщение
POSSIVEL O SPEED HACK FUNCIONAR ?
Nгo sei. Eu apenas removн os erros do cуdigo, Para saber esta informaзгo vocк deveria testar pois de "olho" fica meio complicado.


#Por favor, desative o capslock.
Reply
#5

como faзo para aparecer uma dialog dizendo q o player foi banido por usar speedhack

Код:
// SpeedHack
forward AntiSH(); //aki
public AntiSH() //aki
{
    for(new i=0,j=GetMaxPlayers();i<=j;i++) 
    {
        if(GetSpeedKM(i) > 350) Ban(i); //Mudanзa
    }
    return 1;
}
Reply
#6

Quote:
Originally Posted by VinnyScript
Посмотреть сообщение
como faзo para aparecer uma dialog dizendo q o player foi banido por usar speedhack

Код:
// SpeedHack
forward AntiSH(); //aki
public AntiSH() //aki
{
    for(new i=0,j=GetMaxPlayers();i<=j;i++) 
    {
        if(GetSpeedKM(i) > 350) Ban(i); //Mudanзa
    }
    return 1;
}
Nгo й muito difнcil, veja:
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampforum.blast.hk/showthread.php?tid=119297
https://sampforum.blast.hk/showthread.php?tid=571736
https://sampforum.blast.hk/showthread.php?tid=247845
https://sampforum.blast.hk/showthread.php?tid=202389
https://sampforum.blast.hk/showthread.php?tid=169527
Reply
#7

obrigado
Reply
#8

N confunda erro com warning rs warning : aviso error e outra coisa
Reply
#9

Quote:
Originally Posted by didimk157
Посмотреть сообщение
N confunda erro com warning rs warning : aviso error e outra coisa
Se estб dando warning, й porque estб certo nй?




-
kkkkk.
Reply
#10

Quote:
Originally Posted by didimk157
Посмотреть сообщение
N confunda erro com warning rs warning : aviso error e outra coisa
Complicado esta sua colocaзгo jovem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)