[FilterScript] AntiGod (/god [id]) By DraKoNeoN
#1

Es un sistema en el que el jugador de cualquier tipo '/god [id]' van a hacer un examen en el jugador, si el jugador no pierde la vida como йl acusa a Dios-Mod ha sido probado varias veces y es probable que nunca falla o funciуn de forma incorrecta..

Code in Foro:

pawn Код:
#include <a_samp>
#define NARANJA 0xF97804FF
new Float:GODX;
new Float:GODY;
new Float:GODZ;
new Float:ComandoGod;
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128];
    new idx;
    if(strcmp(cmd, "/god", true) == 0)
    {
          new tmp[20];
          tmp = comandos(cmdtext, idx);
          if(GetDistanceBetweenPlayers(playerid,strval(tmp))>20)
          {
               return SendClientMessage(playerid,NARANJA,"[INCORRECT]: Jugador Longe Demas");
          }
          if(GetPlayerInterior(strval(tmp)>0))
          {
               return SendClientMessage(playerid,NARANJA,"[INCORRECT]: Jugador en Interior");
          }
          if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, NARANJA, "[INCORRECT]: El Jugador si encontra OFF-LINE");
          if(strval(tmp) == playerid) return SendClientMessage(playerid, NARANJA, "[INCORRECT]: No Pode Reportar a Ti");
          if(strlen(tmp) == 0) return SendClientMessage(playerid, NARANJA, "Uso del Comando: /god [ID]");
          GetPlayerHealth(strval(tmp),ComandoGod);
          SetPlayerHealth(strval(tmp),80);
          GetPlayerPos(strval(tmp), GODX, GODY, GODZ);
          SetPlayerPos(strval(tmp), GODX, GODY, GODZ+20);
          SetTimerEx("CheckGod",2000,false,"ii",playerid,strval(tmp));//No Altere Tiempo
          SendClientMessage(playerid,NARANJA, "[INFO]: Para llevar a cabo con йxito congelaremos durante 2  segundos");
          TogglePlayerControllable(playerid,0);
          return 1;
    }
    return 0;
}
stock GetDistanceBetweenPlayers(playerid,playerid2)//By: Slick
{
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
    new Float:dis;
    GetPlayerPos(playerid,x1,y1,z1);
    GetPlayerPos(playerid2,x2,y2,z2);
    dis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs          (floatsub(z2,z1)),2));
    return floatround(dis);
}
comandos(const string[], &index)//strtok Mudada,no sei lo creator del code
{
        new length = strlen(string);
        while ((index < length) && (string[index] <= ' '))
        {
            index++;
        }
        new offset = index;
        new result[20];
        while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
        {
            result[index - offset] = string[index];
            index++;
        }
        result[index - offset] = EOS;
        return result;
}

forward CheckGod(health1,playerid);
public CheckGod(health1,playerid)
{
     new string[62+MAX_PLAYER_NAME+MAX_PLAYER_NAME];
     new Float:x, Float:y, Float:z;
     GetPlayerPos(playerid, x, y, z);
     if(z != GODZ) return 0;
     new Float:health;
     GetPlayerHealth(playerid,health);
     if(health >= 80)
     {
          new name2[MAX_PLAYER_NAME];
          GetPlayerName(health1, name2, sizeof(name2));
          new name[MAX_PLAYER_NAME];
          GetPlayerName(playerid, name, sizeof(name));
          format(string, sizeof(string),"-AntiGod-: %s ha banned for GodMod (By: %s [/god])",name,name2);
          SendClientMessageToAll(NARANJA, string);
          Ban(playerid);
     }
          /*
          if(health != 80)
          {
           SendClientMessage(health1,VERMELHO,"[ERRO]: Player Nгo God,Preste Mais atencao ao  reportar,[Como Puniзгo Morreras]");
           SetPlayerHealth(health1,0);    
          }
         */

     SetPlayerHealth(playerid,ComandoGod);
     TogglePlayerControllable(health1,1);
     return 1;
}
Link:

http://pastebin.com/rc91Mayt

Gracias

DraKoN



Perdone mi Mal espaсol i Indentation..
Despuйs publicar el vнdeo si alguien mi Ayuda..
Reply


Messages In This Thread
AntiGod (/god [id]) By DraKoNeoN - by ipsBruno - 08.08.2010, 04:52
Re: AntiGod (/god [id]) By DraKoNeoN - by MrDeath537 - 08.08.2010, 05:11
Re: AntiGod (/god [id]) By DraKoNeoN - by SeQualX - 08.08.2010, 05:43
Re: AntiGod (/god [id]) By DraKoNeoN - by CristianTdj - 08.08.2010, 08:28
Re: AntiGod (/god [id]) By DraKoNeoN - by TheChaoz - 08.08.2010, 09:35
Re: AntiGod (/god [id]) By DraKoNeoN - by ipsBruno - 08.08.2010, 11:06
Respuesta: AntiGod (/god [id]) By DraKoNeoN - by Cesar_Biker - 08.08.2010, 11:15
Re: Respuesta: AntiGod (/god [id]) By DraKoNeoN - by ipsBruno - 08.08.2010, 11:33
Re: AntiGod (/god [id]) By DraKoNeoN - by xenowort - 08.08.2010, 12:44
Re: AntiGod (/god [id]) By DraKoNeoN - by MrDeath537 - 08.08.2010, 15:42

Forum Jump:


Users browsing this thread: 2 Guest(s)