Useful Commands #1
#22

Here is some commands i created for admins (for fun, and also to annoy cheaters before kicking/banning them!) I hope you like and please give credits if you use these cool commands :

First, add this at the begining of the script:
pawn Code:
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA


GOD MODE reset your life to 250hp each 50ms, you can fall of the hightest building without dying (if you have no parachute)

At the begining of the script:
pawn Code:
new GodTimer;
new God[MAX_PLAYERS];
In OnGameModeInit:
pawn Code:
GodTimer = SetTimer("InfiniteLife",50,1);
In OnGameModeExit:
pawn Code:
KillTimer(GodTimer);
The command:
pawn Code:
if((strcmp(cmdtext,"/iddad",true)==0)||(strcmp(cmdtext,"/god",true)==0))
  {
    if (IsPlayerAdmin(playerid))
    {
      if(God[playerid] == 0)
      {
        God[playerid] = 1;
        SendClientMessage(playerid,COLOR_GREEN,"GODMODE ON");
      }
      else
      {
        God[playerid] = 0;
        SendClientMessage(playerid,COLOR_RED,"GODMODE OFF");
        SetPlayerHealth(playerid, 100);
      }
    }
    else
    {
      SendClientMessage(playerid,COLOR_RED,"COMMANDS FOR ADMINS ONLY");
    }
    return 1;
  }
The function:
pawn Code:
public InfiniteLife()
{
  for (new i = 0; i < MAX_PLAYERS; i++)
  {
    if (IsPlayerConnected(i) && God[i] == 1)
    {
      SetPlayerHealth(i, 250);
    }
  }
}


RANDOM WEAPONS SET(thx to Simon) give you random set of weapons (you have to define the sets)

At the begining of the script:
pawn Code:
new Weapons[MAX_PLAYERS];
new WeaponSet[4][5] =
{
  {9, 24, 26, 32, 38},
  {8, 23, 25, 30, 37},
  {2, 10, 22, 28, 41},
  {5, 14, 23, 29, 42}
/* {x1, x2, x3, x4, x5},
  {x1, x2, x3, x4, x5},
  {x1, x2, x3, x4, x5},
  {x1, x2, x3, x4, x5},
  {x1, x2, x3, x4, x4} EACH "x" IS A WEAPON TO CHOOSE IN A CLASS. x1 is melee*/

};
The command:
pawn Code:
if((strcmp(cmdtext,"/idkfq",true)==0)||(strcmp(cmdtext,"/weapons",true)==0))
  {
    if (IsPlayerAdmin(playerid))
    {
      new setid = random(sizeof(WeaponSet));
      new ammos = 999999999;
      if (Weapons[playerid] == 0)
      {
        Weapons[playerid] = 1;
        GivePlayerWeapon(playerid,WeaponSet[setid][0],1);//MELEE: AMMO=1
        GivePlayerWeapon(playerid,WeaponSet[setid][1],ammos);
        GivePlayerWeapon(playerid,WeaponSet[setid][2],ammos);
        GivePlayerWeapon(playerid,WeaponSet[setid][3],ammos);
        GivePlayerWeapon(playerid,WeaponSet[setid][4],ammos);
        SendClientMessage(playerid,COLOR_GREEN,"WEAPONS ON");
      }
      else
      {
        Weapons[playerid] = 0;
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid,24,507);
        SendClientMessage(playerid,COLOR_RED,"WEAPONS OFF");
      }
    }
    else
    {
      SendClientMessage(playerid,COLOR_RED,"COMMANDS FOR ADMINS ONLY");
    }
    return 1;
  }


REGULAR MONEY give you 1000$ each 2 seconds

At the begining of the script:
pawn Code:
new GiveMoneyTimer;
new GiveMoney[MAX_PLAYERS];
In OnGameModeInit:
pawn Code:
GiveMoneyTimer = SetTimer("Money",2000,1);
In OnGameModeExit:
pawn Code:
KillTimer(GiveMoneyTimer);
The command:
pawn Code:
if(strcmp(cmdtext,"/cash",true)==0)
  {
    if (IsPlayerAdmin(playerid))
    {
      if (GiveMoney[playerid] == 0)
      {
        GiveMoney[playerid] = 1;
        SendClientMessage(playerid,COLOR_GREEN,"CASH ON");
      }
      else
      {
        GiveMoney[playerid] = 0;
        SendClientMessage(playerid,COLOR_RED,"CASH OFF");
      }
    }
    else
    {
      SendClientMessage(playerid,COLOR_RED,"COMMANDS FOR ADMINS ONLY");
    }
    return 1;
  }
The function:
pawn Code:
public Money()
{
  for (new i = 0; i < MAX_PLAYERS; i++)
  {
    if (IsPlayerConnected(i) && GiveMoney[i] == 1)
    {
      GivePlayerMoney(i,1000);
    }
  }
}

Retype these commands to turn off them, or use this reset command:

pawn Code:
if(strcmp(cmdtext,"/reset",true)==0)
  {
    if (IsPlayerAdmin(playerid))
    {
      if ((God[playerid] == 0)&&(Weapons[playerid] == 0)&&(GiveMoney[playerid] == 0))
      {
        SendClientMessage(playerid,COLOR_GREEN,"NOTHING TO RESET");
      }
      if (God[playerid] == 1)
      {
        God[playerid] = 0;
        SetPlayerHealth(playerid,100);
        SendClientMessage(playerid,COLOR_RED,"GODMODE OFF");
      }
      if (Weapons[playerid] == 1)
      {
        Weapons[playerid] = 0;
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid,24,507);
        SendClientMessage(playerid,COLOR_RED,"WEAPONS OFF");
      }
      if (GiveMoney[playerid] == 1)
      {
        GiveMoney[playerid] = 0;
        SendClientMessage(playerid,COLOR_RED,"CASH OFF");
      }
    }
    else
    {
      SendClientMessage(playerid,COLOR_RED,"COMMANDS FOR ADMINS ONLY");
    }
    return 1;
  }
Reply


Messages In This Thread
Useful Commands #1 - by Allan - 18.06.2006, 22:24
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by [AU]Ownage - 26.06.2006, 21:58
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by kaka - 26.06.2006, 22:45
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by switch - 27.06.2006, 00:28
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by OffRoader23 - 27.06.2006, 00:51
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by vCE - 27.06.2006, 01:02
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by switch - 27.06.2006, 01:46
Teleporting a vehicle just in the front of you. - by Joshua Yu - 03.07.2006, 10:38
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Donny_k - 04.07.2006, 02:46
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Whitestrom - 04.07.2006, 04:37
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Mike - 04.07.2006, 11:51
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Roka - 04.07.2006, 12:11
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by rapidZ - 04.07.2006, 12:15
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Roka - 04.07.2006, 12:16
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Roka - 09.07.2006, 16:10
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Bearz - 10.07.2006, 19:15
Re: Teleporting a vehicle just in the front of you. - by Staf - 13.07.2006, 16:54
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by LennardF[NL] - 13.07.2006, 17:15
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Jamming - 13.07.2006, 23:23
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Joshua Yu - 14.07.2006, 01:26
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by [QB]Flame^ - 01.08.2006, 08:50
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by yom - 23.09.2006, 19:40
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by [EGG]Marco - 23.09.2006, 20:47
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Towlies - 24.09.2006, 05:10
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Me - 24.09.2006, 09:12
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by yom - 24.09.2006, 09:20
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by boylett - 24.09.2006, 10:15
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by yom - 24.09.2006, 10:39
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by [EGG]Marco - 24.09.2006, 17:23
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by DeC.dual - 24.09.2006, 17:31
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Towlies - 24.09.2006, 18:02
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by 50p - 24.09.2006, 18:11
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by [R][O][G][3][R] - 25.09.2006, 00:06
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by yom - 25.09.2006, 03:19
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by [R][O][G][3][R] - 25.09.2006, 14:06
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by [R][O][G][3][R] - 25.09.2006, 23:27
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by yom - 10.10.2006, 11:33
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by FeaR - 10.10.2006, 12:56
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by yom - 10.10.2006, 13:59
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Nitroglycerine - 10.10.2006, 14:20
Re: Post your Useful/Intresting/Weird OnPlayerCommandText Commands! - by Nitroglycerine - 10.10.2006, 15:34

Forum Jump:


Users browsing this thread: 2 Guest(s)