Advertisement
Guest User

/allhunt by nico diablo

a guest
Oct 31st, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.00 KB | None | 0 0
  1.  
  2. new hunted[MAX_PLAYERS], id, name[MAX_PLAYER_NAME]
  3.  
  4. CMD:allhunt(playerid, params[])
  5. {
  6.         if(PlayerInfo[playerid][pAdmin] >=3)
  7.         {
  8.                 new gun1, gun2, gun3, gun4, Float:hp, Float:armor, string[128], admin[MAX_PLAYER_NAME], string[128];
  9.                 if(sscanf(params, "uffdddd", id, gun1, gun2, gun3, gun4, hp, armor) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /allhunt [playerid/partofname] [health] [armor] [gun1] [gun2] [gun3] [gun4]");
  10.                 if(gun1 < 1 || gun1 > 47) return SendClientMessage(playerid, COLOR_GREY, "Don't go below 1 or above 47.");
  11.                 if(gun2 < 1 || gun2 > 47) return SendClientMessage(playerid, COLOR_GREY, "Don't go below 1 or above 47.");
  12.                 if(gun3 < 1 || gun3 > 47) return SendClientMessage(playerid, COLOR_GREY, "Don't go below 1 or above 47.");
  13.                 if(gun4 < 1 || gun4 > 47) return SendClientMessage(playerid, COLOR_GREY, "Don't go below 1 or above 47.");
  14.                 GetPlayerName(id, admin, sizeof(admin));
  15.                 GetPlayerName(id, name, sizeof(admin));
  16.         SetPlayerColor(id, COLOR_PINK);
  17.         {
  18.             if(PlayerInfo[playerid][pAdmin] >=1)
  19.             {
  20.                 format(string, sizeof(string), "{CD5C5C}AdmCmd: %s has started a hunt on %s.", admin, name);
  21.                 SendClientMessage(playerid, COLOR_WHITE, string);
  22.             }
  23.         }
  24.         format(string, sizeof(string), "{FF1493}Kill the hunted %s to earn prize!", name);
  25.         SendClientMessageToAll(COLOR_PINK, string);
  26.         Hunted[id] = 1;
  27.     }
  28.     else
  29.     {
  30.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command!");
  31.     }
  32.     return 1;
  33. }
  34.  
  35. OnPlayerDeath(playerid, killerid);
  36. {
  37.     if(Hunted[id] = 1)
  38.     {
  39.         new string[128], killer[MAX_PLAYER_NAME];
  40.         GetPlayerName(playerid, name, sizeof(name));
  41.         format(string, sizeof(string), "Father, please forgive %s as he killed the hunted %s.", killer, name);
  42.         SendClientToAll(COLOR_YELLOW, string);
  43.         PlayerInfo[killerd][pPot] ++;
  44.         PlayerInfo[killerd][pCrack] ++;
  45.         SetPlayerColor(id, COLOR_WHITE);
  46.     }
  47.     return 1;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement