The /akill maded by me with 10 seconds, for the power of the admins!
#1

pawn Код:
//--------------------------------[akill]---------------------------------------------------------------------
       if(strcmp(cmd, "/akill", true) == 0)
       {
           GetPlayerName(playerid, sendername, sizeof(sendername));
               tmp = strtok(cmdtext, idx);
               if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 4)
               {
                       SendClientMessage(playerid, COLOR_GREY, "/akill [Playerid]");
                       return 1;
               }
               giveplayerid = strval(tmp);
               GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
               GetPlayerName(playerid, sendername, sizeof(sendername));
               if(IsPlayerConnected(giveplayerid))
               {
                       if(PlayerInfo[playerid][pAdmin] >= 4)
                       {
                           if(IsPlayerConnected(giveplayerid))
                           {
                                       format(string, sizeof(string), "AdmCMD: %s has killed by %s",giveplayer, sendername);
                                       ABroadCast(COLOR_LIGHTRED,string,1);
                                       //SendClientMessageToAll(COLOR_DBLUE, string);
                                       SetPlayerHealth(giveplayerid, 0);
                                       new Float:boomx, Float:boomy, Float:boomz;
                                       GetPlayerPos(giveplayerid,boomx, boomy, boomz);
                                       //CreateExplosion(boomx, boomy , boomz, 7, 10);
                                       printf("[Command] %s has used /akill to kill %s", PlayerName(playerid), giveplayer);
                               }
                               else
                               {
                                   format(string, sizeof(string), "%d is not an active player.", giveplayerid);
                                       SendClientMessage(playerid, COLOR_RED, string);
                               }
                       }
                       else
                       {
                               SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
                       }
               }
               else
               {
                   SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
               }
               return 1;
       }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)