SA-MP Forums Archive
[Ajuda] Ant Xiter - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ant Xiter (/showthread.php?tid=337829)



[Ajuda] Ant Xiter - Emerson_xD - 28.04.2012

Seguinte, tem um anti xiter no meu gm e tipo, atй qnd sуcio pega o jetpack aparece a msg pros admins, keria que quando o socio pegasse nгo aparecesse, tentei por a linha:
pawn Код:
if(PlayerInfo[playerid][pSocio] == 1)
Mais nгo deu

Segue o cуdigo:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
// JetPack
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
                {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
                }

Linha do sуcio:
pawn Код:
pSocio
Ve se me ajuda aew , +rep



Re: [Ajuda] Ant Xiter - GReeN_WOoD - 28.04.2012

n testei, testa ae.
PHP код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new 
string[128];
    new 
giveplayer[MAX_PLAYER_NAME];
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i) && gPlayerLogged[i] == && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            
// JetPack
            
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!
PlayerInfo[playerid][pSocio])
                {
                    
GetPlayerName(igiveplayersizeof(giveplayer));
                   
format(stringsizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                
ABroadCast(COLOR_LIGHTRED,string,1);
                } 



Re: [Ajuda] Ant Xiter - GTO.DoDo - 28.04.2012

GM Play Hard?


Respuesta: Re: [Ajuda] Ant Xiter - Emerson_xD - 28.04.2012

Quote:
Originally Posted by dodostyle
Посмотреть сообщение
GM Play Hard?
Nгo


@GReeN_WOoD
Seguinte erro:



Re: [Ajuda] Ant Xiter - Caio_Freeze - 28.04.2012

Tenta assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[giveplayer][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Ajudei Reep +


Respuesta: Re: [Ajuda] Ant Xiter - Emerson_xD - 28.04.2012

Quote:
Originally Posted by Caio_Freeze
Посмотреть сообщение
Tenta assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[giveplayer][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Ajudei Reep +
49770 Erro C:\Users\Emerson\Downloads\Brasil Life Extre... 033: array must be indexed(variable"giveplayer")


Re: [Ajuda] Ant Xiter - Caio_Freeze - 28.04.2012

Veja assim:
pawn Код:
public CheckHack()// Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && PlayerInfo[giveplayer][pSocio] && spawnado[i] > 0) {

            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK) {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
            }
se nгo der assiim use esse:
pawn Код:
public CheckHack()// Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0) {

            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK && PlayerInfo[giveplayer][pSocio])
               {
                GetPlayerName(i, giveplayer, sizeof(giveplayer));
                format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!", giveplayer,i);
                ABroadCast(COLOR_LIGHTRED,string,1);
            }



Re: [Ajuda] Ant Xiter - @Riichard - 28.04.2012

Quote:
Originally Posted by Caio_Freeze
Посмотреть сообщение
Tenta assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[giveplayer][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Ajudei Reep +
Pedindo rep pra little


Topic
Tente assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(!PlayerInfo[i][pSocio])
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }
Codigo do Caio..


Re: [Ajuda] Ant Xiter - Caio_Freeze - 28.04.2012

Quote:
Originally Posted by @Riichard
Посмотреть сообщение
Pedindo rep pra little
n vi q ele era little ¬¬


Respuesta: [Ajuda] Ant Xiter - Emerson_xD - 30.04.2012

Consegui tirar o erro, vlw glr vcs sгo de+
Nгo tentei de alguns mais o cуdigo ficou assim:
pawn Код:
public CheckHack() // Anti Xiter de Armas e Jet Pack
{
    new playerid; playerid<MAX_PLAYERS; playerid++;// editei essa linha
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
        {
            // JetPack
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
             {
                  if(PlayerInfo[playerid][pSocio] >= 1)// acrescentei essa
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                   format(string, sizeof(string), "ANTICHEAT: %s[ID %d] estб usando um JetPack /tv nele rapido!",giveplayer,i);
                }
                ABroadCast(COLOR_LIGHTRED,string,1);
                }

dei uma estudada e consegui .