Vikshay

IRC Slap

Oct 15th, 2014
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.38 KB | None | 0 0
  1. IRCCMD:slap(botid, channel[], user[], host[], params[])
  2. {
  3.         new playerid, reason[64];
  4.         new player1;
  5.         if (sscanf(params, "dS(No reason.)[64]", playerid, reason))
  6.         {
  7.                 return 1;
  8.         }
  9.     if (IRC_IsHalfop(botid, channel, user))
  10.         {
  11.                 if(IsPlayerConnected(playerid))
  12.                 {
  13.                         new msg[128], pname[MAX_PLAYER_NAME];
  14.                         GetPlayerName(playerid, pname, sizeof(pname));
  15.                         format(msg, sizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s", pname, user, reason);
  16.                         IRC_GroupSay(groupID, channel, msg);
  17.                         format(msg, sizeof(msg), "*** %s has been slapped by Staff Member %s on IRC for reason: %s", pname, user, reason);
  18.                         SendClientMessageToAll(0xFF0000C8, msg);
  19.                         new Float:Health;
  20.                         new Float:x, Float:y, Float:z;
  21.                         GetPlayerHealth(player1,Health);
  22.                         SetPlayerHealth(player1,Health -10);
  23.                         GetPlayerPos(player1,x,y,z);
  24.                         SetPlayerPos(player1,x,y,z+7);
  25.                         PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
  26.                         PlayerPlaySound(player1,1190,0.0,0.0,0.0);
  27.                 }
  28.         }
  29.         return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment