[Tutorial] Anti-Weapon hack
#1

Bom gente,meu 1є tutorial vamos lб

Esse tutorial de hoje irei ensinar a como colocar em seu servidor um anti-xiter de armas

1є Vamos criar uma Forward Chamada AntiHack

PHP код:
forward AntiHack(playerid); 
2є Criaremos um SetTimer no OnGameModeInit.
PHP код:
SetTimer("AntiHack"20001);// Obs: Esse SetTimer Server para verificar se o player puxo alguma arma ilegal 
3є Criaremos a Public onde terб o id das armas proibidas !

PHP код:
public AntiHack(playerid)
{
   new 
string[128];
   new 
giveplayer[MAX_PLAYER_NAME];
   if(
IsPlayerInRangeOfPoint(playerid10.0FogoX[1],FogoY[1],FogoZ[1]))
       {
     for(new 
0MAX_PLAYERSi++)
     {
         if(
IsPlayerConnected(i) && gPlayerLogged[i] == && !IsPlayerNPC(i) && spawnado[i] > 0)
         {
                        if(
GetPlayerWeapon(i) == 35)// Aqui Serб o ID Da Arma
             
{
            
GetPlayerName(igiveplayersizeof(giveplayer));
            
format(stringsizeof(string), "ANTIXITER: %s[%d] pegou alguma arma pelo ****** e foi banido automaticamente!"giveplayer,i);// Aqui a msg q serб exibida
            
SendClientMessageToAll(COLOR_LIGHTREDstring);
            
SBan(i"Puxando Armas Pelo ******""Automбtico");// Aqui e a parte do ban ai vocк mim pergunta porque vocк nгo usa Ban(i);? a Resposta й porque usando Ban(i); o Player Serб banido e colocado numa pasta chamada samp.ban na host ou seja se for desbanir o player terб q ir na host e usando o Sban Nгo.
            
}
          }
   }
   return 
1
By:ScriptG
Reply
#2

E se o cara pegar uma arma que nгo for proibida no servidor pelo s0rvete?
Reply
#3

Quote:
Originally Posted by Juniiro3
Посмотреть сообщение
E se o cara pegar uma arma que nгo for proibida no servidor pelo s0rvete?
Boa observaзгo!

Irei refazer e lanзar o v2.0.

Obrigado
Reply
#4

Vocк nem testou , pq usa um settimer , e na callback usa playerid , e dentro dela usa loop.
Reply
#5

Quote:
Originally Posted by ScriptGameS
Посмотреть сообщение
PHP код:
if(IsPlayerInRangeOfPoint(playerid10.0FogoX[1],FogoY[1],FogoZ[1])) 
Copia de seu GM , pelo menos coloca os creditos de quem fez !
Reply
#6

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 10.0, FogoX[1],FogoY[1],FogoZ[1]))
       {
     for(new i = 0; i < MAX_PLAYERS; i++)
     {
         if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && !IsPlayerNPC(i) && spawnado[i] > 0)
         {
Parei por aqui.
Reply
#7

Nгo sei se foi vocк mesmo que fez, mas tipo, nгo ficou muito bom...

Tome uma dica, quando vocк for fazer tutoriais, tente explicar melhor oque vocк estб fazendo, e o mais уbvio, tente entender oque vocк tб fazendo tambйm.
Reply
#8

Removido
Reply
#9

Que negrice foi essa cara?
ctrl+c - ctrl+v dahora.
Reply
#10

Quote:
Originally Posted by DouglasRodrigues
Посмотреть сообщение
Que negrice foi essa cara?
ctrl+c - ctrl+v dahora.
nгo intendi? eu msm fiz esse tuto '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)