Guest
Public paste!

hphack

By: a guest | Mar 10th, 2010 | Syntax: None | Size: 1.21 KB | Hits: 39 | Expires: Never
Copy text to clipboard
  1. if(strcmp(cmd, "/superslap", true) == 0)
  2.         {
  3.             if(IsPlayerConnected(playerid))
  4.             {
  5.                         tmp = strtok(cmdtext, idx);
  6.                         if(!strlen(tmp))
  7.                         {
  8.                                 SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /superslap [playerid/PartOfName]");
  9.                                 return 1;
  10.                         }
  11.                         new playa;
  12.                         new Float:shealth;
  13.                         new Float:slx, Float:sly, Float:slz;
  14.                         playa = ReturnUser(tmp);
  15.                         if (PlayerInfo[playerid][pAdmin] >=2)
  16.                         {
  17.                             if(IsPlayerConnected(playa))
  18.                             {
  19.                                 if(playa != INVALID_PLAYER_ID)
  20.                                 {
  21.                                         GetPlayerName(playa, giveplayer, sizeof(giveplayer));
  22.                                                 GetPlayerName(playerid, sendername, sizeof(sendername));
  23.                                                 GetPlayerHealth(playa, shealth);
  24.                                                 SetPlayerHealth(playa, shealth-25);
  25.                                                 GetPlayerPos(playa, slx, sly, slz);
  26.                                                 SetPlayerPos(playa, slx, sly, slz+5);
  27.                                                 PlayerPlaySound(playa, 1130, slx, sly, slz+5);
  28.                                                 printf("AdmCmd: %s slapped %s",sendername,  giveplayer);
  29.                                                 format(string, sizeof(string), "AdmCmd: %s was superslapped by %s",giveplayer ,sendername);
  30.                                                 ABroadCast(COLOR_LIGHTRED,string,1);
  31.                                         }
  32.                                 }
  33.                         }
  34.                         else
  35.                         {
  36.                                 SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
  37.                         }
  38.                 }
  39.                 return 1;
  40.         }