Guest User

Castle

a guest
Apr 7th, 2009
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.19 KB | None | 0 0
  1. new ckStatus[MAX_PLAYERS] = 0;
  2.  
  3.     if(strcmp(cmd, "/characterkill", true) == 0 || strcmp(cmd, "/ck, true) == 0)
  4.     {
  5.         if(IsPlayerConnected(playerid))
  6.         {
  7.             tmp = strtok(cmdtext, idx);
  8.             if(!strlen(tmp)){ SendClientMessage(playerid, COLOR_GRAD1, "USAGE: (/ck)/characterkill [PlayerName/ID]");
  9.             new ckPlayer;
  10.             ckPlayer = ReturnUser(tmp);
  11.             if(GetDistanceBetweenPlayers(playerid, HealedPlayer) < 15)
  12.             {
  13.                 if(ckPlayer != INVALID_PLAYER_ID)
  14.                 {
  15.                     new ckMSG[128];
  16.                     new ckMSG2[128];
  17.                     format(ckMSG, sizeof(ckMSG), "You have set a Character Kill on [%d]%s", ckPlayer, GetPlayerNameEx(ckPlayer));
  18.                     SendClientMessage(playerid, COLOR_LIGHTGREEN, ckMSG);
  19.                     format(ckMSG2, sizeof(ckMSG2), "[%d]%s requested your approval on your Character Kill",playerid, GetPlayerNameEx(playerid))
  20.                     SendClientMessage(ckPlayer, COLOR_ADMINCMD, ckMSG2);
  21.                     SendClientMessage(ckPlayer, COLOR_LIGHTBLUE, "type: (/ack)/acceptcharacterkill to Accept the CK or (/dck)/declinecharacterkill to Decline a CK");
  22.                     ckStatus[ckPlayer] = 1;
  23.                     return 1;
  24.                 }
  25.                 else{ SendClientMessage(playerid, COLOR_GRAD, "Invalid PlayerName/ID"); return 1; }
  26.             }
  27.             else{ SendClientMessage(playerid, COLOR_GRAD, "You are too far away from that person"); return 1; }
  28.         }
  29.     }
  30.     if(strcmp(cmd, "/acceptcharacterkill", true) == 0 || strcmp(cmd, "/ack", true) == 0)
  31.     {
  32.         if(IsPlayerConnected(playerid))
  33.         {
  34.             if(ckStatus[playerid] == 1)
  35.             {
  36.                 PlayerInfo[playerid][pCK] = 1;
  37.                 SendClientMessage(playerid, COLOR_ADMINCMD, "You have been Character Killed");
  38.                 SendClientMessage(playerid, COLOR_GRAD2, "You no longer can play on this Character, Make a new one please");
  39.                 Kick(playerid);
  40.                 ckStatus[playerid] = 0;
  41.                 return 1;
  42.             }
  43.             else{ SendClientMessage(playerid, COLOR_GRAD, "You don't have any Character Kill requests"); return 1; }
  44.         }
  45.     }
  46.     if(strcmp(cmd, "/declinecharacterkill", true) == 0 || strcmp(cmd, "/dck", true) == 0)
  47.     {
  48.         if(IsPlayerConnected(playerid))
  49.         {
  50.             if(ckStatus[playerid] == 1)
  51.             {
  52.                 SendClientMessage(playerid, COLOR_ADMINCMD, "You have Declined the Character Kill");
  53.             }
  54.         }
  55.         return 1;
  56.     }
Advertisement
Add Comment
Please, Sign In to add comment