this work correctly ?
#1

Hi, I have a question.
I have done a weapon check for admins, and now my question wheter it work correctly.
Because I got many unban requests in my community, and they said that they didn't hack ammo (but they didn't lost ammo and on the other people it work..).
A other guy had a Minigun and where i've checked it, the minigun wasn't in the list ?!
And I must ban him, altough the Anti-Hack timer should do it..

pawn Код:
if(strcmp(cmd, "/weapons", true) == 0)
  {
    tmp = strtok(cmdtext, idx);
    if(PlayerInfo[playerid][pAdmin] < 1)
    {
          SendClientMessage(playerid, _COLOR_RED2, "You are not authorized to use this command");
          return 1;
    }
    if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 1)
    {
            SendClientMessage(playerid,_COLOR_WHITE,"Usage: /weapons [ID]");
        return 1;
    }
    giveplayerid = strval(tmp);
    if(PlayerInfo[giveplayerid][pAdmin] == MaxAdminLevel && PlayerInfo[playerid][pAdmin] != MaxAdminLevel) return SendClientMessage(playerid,_COLOR_RED,"You cannot use this command on this admin !");
    if(IsPlayerConnected(giveplayerid))
        {
          CMDMessageToAdmins(playerid,"WEAPONS");
            format(string,sizeof(string),"%s(%d)'s Weapons:",PlayerName(giveplayerid), giveplayerid);
            SendClientMessage(playerid,_COLOR_WHITE,string);
            new weapons[13][2];
            for (new i = 0; i < 13; i++)
            {
              new weaponname[128];
              GetPlayerWeaponData(giveplayerid, i, weapons[i][0], weapons[i][1]);
              if(weapons[i][1] >= 1)
                {
                  GetWeaponName(weapons[i][0], weaponname, sizeof(weaponname));
                  format(string,sizeof(string),"%s (%d Ammo)",weaponname,weapons[i][1]);
                  SendClientMessage(playerid,0x2641FEFF,string);
              }
            }
        }
        else return SendLangMessage(playerid,_COLOR_RED,"This Player does not exists !");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)