AntiWeapon [Consulta]
#1

Como esta gente, quisieran que me den una mano, tengo este AntiWeapon

PHP код:
#include <a_samp>
forward AntiCheatCheck(playerid);
public 
AntiCheatCheck(playerid)
{
        
//anti jetpack
        
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
        {
                
SendClientMessage(playerid,0xFFFFFFAA,"Mal si Jetpack ! Server ta zabanoval !");
                
Ban(playerid);
        }
        
//anti minigun
        
if(GetPlayerWeapon(playerid) == 38)
        {
                
SendClientMessage(playerid,0xFFFFFFAA,"Mal si Minigun ! Server ta zabanoval !");
                
Ban(playerid);
        }
        
//anti speed hack
        
if(GetPlayerSpeed(playerid) > 600)
        {
                
SendClientMessage(playerid,0xFFFFFFAA,"Podozrenie na SpeedHack ! Server ta kickol !");
                
Kick(playerid);
        }
        return 
1;
}
stock GetPlayerSpeed(playerid)
{
    new 
Float:ST[4];
    if(
IsPlayerInAnyVehicle(playerid))
    
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else 
GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
    return 
floatround(ST[3]);
}
public 
OnFilterScriptInit()
{
        
SetTimer("AntiCheatCheck",3000,true);
        return 
1;

pero quisiera poner una funcion que cuando vayan a minijuego /minigun no los banee ya que si entro al minijuego /minigun me banea -dots


la funcion de mi teleport /minigun es:

PHP код:
if(strcmp(cmdtext"/Minigun"true) == 0)
{
new 
Float:health;
GetPlayerHealth(playerid,health);
if(
health >= 20)
{
if (
IsPlayerInAnyVehicle(playerid)) return    SendClientMessage(playeridVERDELIMA"Servidor{FFFFFF}: Baja De Tu Vehiculo e Intentalo Nuevamente ");
VariableDeBloqueo[playerid] = 1//Mini Juego Bloqueo CMD
SetPlayerArmour(playerid,100); //le da 100 de Chaleco
SetPlayerHealth(playerid,100); //le da 100 de Vida
SetPlayerVirtualWorld(playerid12);
SetPlayerInterior(playerid1);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
GivePlayerWeapon(playerid3810000);
GameTextForPlayer(playerid,"~r~>>~b~Bienvenido Minigun~r~<<",2500,1);
new 
Minigun=random(12);
if (
Minigun==0) { SetPlayerPos(playerid,2205.7100,1580.5699,999.9791);}
else if (
Minigun==1) { SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);}
else if (
Minigun==2) { SetPlayerPos(playerid,2230.8403,1580.6292,999.9669);}
else if (
Minigun==3) { SetPlayerPos(playerid,2227.4775,1596.2130,999.9703);}
else if (
Minigun==4) { SetPlayerPos(playerid,2224.9924,1613.1871,999.9725);}
else if (
Minigun==5) { SetPlayerPos(playerid,2218.0820,1614.4119,999.9827);}
else if (
Minigun==6) { SetPlayerPos(playerid,2204.9968,1612.7771,999.9773);}
else if (
Minigun==7) { SetPlayerPos(playerid,2193.0413,1613.0560,999.9738);}
else if (
Minigun==8) { SetPlayerPos(playerid,2176.7170,1624.3013,999.9732);}
else if (
Minigun==9) { SetPlayerPos(playerid,2176.5144,1601.5717,999.9766);}
else if (
Minigun==10) { SetPlayerPos(playerid,2187.5549,1590.9081,999.9796);}
else if (
Minigun==11) { SetPlayerPos(playerid,2173.7686,1585.7428,999.9722);}
}
else
{
SendClientMessage(playeridVERDELIMA"Server Freeroam{FFFFFF}: Llena tu Vida para usar los TelePorts");
}
return 
1;

desde ya muchas gracias
Reply
#2

pawn Код:
#include <a_samp>

new EnMinigun[MAX_PLAYERS];

forward AntiCheatCheck(playerid);
public AntiCheatCheck(playerid)
{
        //anti jetpack
        if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
        {
                SendClientMessage(playerid,0xFFFFFFAA,"Mal si Jetpack ! Server ta zabanoval !");
                Ban(playerid);
        }
        if(GetPlayerWeapon(playerid) == 38)
        {
            SendClientMessage(playerid,0xFFFFFFAA,"Mal si Minigun ! Server ta zabanoval !");
           
            if(EnMinigun[playerid] == 0)
            {
                Ban(playerid);
            }
        }
        //anti speed hack
        if(GetPlayerSpeed(playerid) > 600)
        {
                SendClientMessage(playerid,0xFFFFFFAA,"Podozrenie na SpeedHack ! Server ta kickol !");
                Kick(playerid);
        }
        return 1;
}

stock GetPlayerSpeed(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
    return floatround(ST[3]);
}

public OnFilterScriptInit()
{
    SetTimer("AntiCheatCheck",3000,true);
    return 1;
}

if(strcmp(cmdtext, "/Minigun", true) == 0)
{
   new Float:health;
   GetPlayerHealth(playerid,health);

   if(health >= 20)
   {
       if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERDELIMA, "Servidor{FFFFFF}: Baja De Tu Vehiculo e Intentalo Nuevamente ");
       VariableDeBloqueo[playerid] = 1;
       EnMinigun[playerid] = 1;
       SetPlayerArmour(playerid,100);
       SetPlayerHealth(playerid,100);
       SetPlayerVirtualWorld(playerid, 12);
       SetPlayerInterior(playerid, 1);
       ResetPlayerWeapons(playerid);
       SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
       GivePlayerWeapon(playerid, 38, 10000);
       GameTextForPlayer(playerid,"~r~>>~b~Bienvenido Minigun~r~<<",2500,1);

       switch(random(12))
       {
           case 0: SetPlayerPos(playerid,2205.7100,1580.5699,999.9791);
           case 1: SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
           case 2: SetPlayerPos(playerid,2230.8403,1580.6292,999.9669);
           case 3: SetPlayerPos(playerid,2227.4775,1596.2130,999.9703);
           case 4: SetPlayerPos(playerid,2224.9924,1613.1871,999.9725);
           case 5: SetPlayerPos(playerid,2218.0820,1614.4119,999.9827);
           case 6: SetPlayerPos(playerid,2204.9968,1612.7771,999.9773);
           case 7: SetPlayerPos(playerid,2193.0413,1613.0560,999.9738);
           case 8: SetPlayerPos(playerid,2176.7170,1624.3013,999.9732);
           case 9: SetPlayerPos(playerid,2176.5144,1601.5717,999.9766);
           case 10: SetPlayerPos(playerid,2187.5549,1590.9081,999.9796);
           case 11: SetPlayerPos(playerid,2173.7686,1585.7428,999.9722)
       }
   }
   else
   {
   SendClientMessage(playerid, VERDELIMA, "Server Freeroam{FFFFFF}: Llena tu Vida para usar los TelePorts");
   }
   return 1;
}
pawn Код:
//AGREGA EN ONPLAYERSPAWN
EnMinigun = 0;
Reply
#3

Quote:
Originally Posted by Snoopythekill
Посмотреть сообщение
pawn Код:
#include <a_samp>

new EnMinigun[MAX_PLAYERS];

forward AntiCheatCheck(playerid);
public AntiCheatCheck(playerid)
{
        //anti jetpack
        if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
        {
                SendClientMessage(playerid,0xFFFFFFAA,"Mal si Jetpack ! Server ta zabanoval !");
                Ban(playerid);
        }
        if(GetPlayerWeapon(playerid) == 38)
        {
            SendClientMessage(playerid,0xFFFFFFAA,"Mal si Minigun ! Server ta zabanoval !");
           
            if(EnMinigun[playerid] == 0)
            {
                Ban(playerid);
            }
        }
        //anti speed hack
        if(GetPlayerSpeed(playerid) > 600)
        {
                SendClientMessage(playerid,0xFFFFFFAA,"Podozrenie na SpeedHack ! Server ta kickol !");
                Kick(playerid);
        }
        return 1;
}

stock GetPlayerSpeed(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
    return floatround(ST[3]);
}

public OnFilterScriptInit()
{
    SetTimer("AntiCheatCheck",3000,true);
    return 1;
}

if(strcmp(cmdtext, "/Minigun", true) == 0)
{
   new Float:health;
   GetPlayerHealth(playerid,health);

   if(health >= 20)
   {
       if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, VERDELIMA, "Servidor{FFFFFF}: Baja De Tu Vehiculo e Intentalo Nuevamente ");
       VariableDeBloqueo[playerid] = 1;
       EnMinigun[playerid] = 1;
       SetPlayerArmour(playerid,100);
       SetPlayerHealth(playerid,100);
       SetPlayerVirtualWorld(playerid, 12);
       SetPlayerInterior(playerid, 1);
       ResetPlayerWeapons(playerid);
       SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
       GivePlayerWeapon(playerid, 38, 10000);
       GameTextForPlayer(playerid,"~r~>>~b~Bienvenido Minigun~r~<<",2500,1);

       switch(random(12))
       {
           case 0: SetPlayerPos(playerid,2205.7100,1580.5699,999.9791);
           case 1: SetPlayerPos(playerid,2220.1169,1564.6906,1001.9391);
           case 2: SetPlayerPos(playerid,2230.8403,1580.6292,999.9669);
           case 3: SetPlayerPos(playerid,2227.4775,1596.2130,999.9703);
           case 4: SetPlayerPos(playerid,2224.9924,1613.1871,999.9725);
           case 5: SetPlayerPos(playerid,2218.0820,1614.4119,999.9827);
           case 6: SetPlayerPos(playerid,2204.9968,1612.7771,999.9773);
           case 7: SetPlayerPos(playerid,2193.0413,1613.0560,999.9738);
           case 8: SetPlayerPos(playerid,2176.7170,1624.3013,999.9732);
           case 9: SetPlayerPos(playerid,2176.5144,1601.5717,999.9766);
           case 10: SetPlayerPos(playerid,2187.5549,1590.9081,999.9796);
           case 11: SetPlayerPos(playerid,2173.7686,1585.7428,999.9722)
       }
   }
   else
   {
   SendClientMessage(playerid, VERDELIMA, "Server Freeroam{FFFFFF}: Llena tu Vida para usar los TelePorts");
   }
   return 1;
}
pawn Код:
//AGREGA EN ONPLAYERSPAWN
EnMinigun = 0;
Muchas gracias pero igual me sigue baneando
Reply
#4

@Snoopythekill No dejes cуdigos acб, es una consulta, no un pedido.

Yendo al tema, el sistema que te dieron anteriormente deberнa funcionar. Tal vez modificando el "EnMinigun" dentro de la CallBack del anticheat en valor de 1 funcione, claro, dentro no tendrнa nada pero funcionarнa igual. Modificalo a ver que tal.
Reply
#5

Debe funcionar, no funciona porquй este 'AntiWeapon' lo tienes en un fs y el comando minigun en tu gm, mete el antiweapon a tu gm y andarб .
Reply
#6

PHP код:
//AGREGA EN ONPLAYERSPAWN
EnMinigun 0
en esta parte me salio un error de array pero le puse asi..

PHP код:
EnMinigun (playerid)= 0
hice bien
Reply
#7

pawn Код:
EnMinigun[playerid]= 0;
Ahн sн estб bien.

Recuerda que son arrays, no funciones.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)