Commands needs to be typed 2 times before working and showing wrong
#3

Thank you! That one works fine. But now I wanted to add player weapons, but I have no experience with GetWeaponData.

Could someone help me with this command (adding weapons - showing player weapons)

pawn Код:
dcmd_whois(playerid, params[])
{
    new playermoney;

if(!strlen(params))
    {
        SystemMessage(playerid, "[USAGE] ''/whois [playername/id]''.");
        return 1;
    }

giveplayerid = ReturnUser(params);

    new Float:pWeapons
    GetPlayerWeapons(giveplayerid, pWeapons);

    new Float:pHealth,Float:pArmour;
    GetPlayerHealth(giveplayerid,pHealth);
    GetPlayerArmour(giveplayerid,pArmour);
   
    new PlayerIP[16];
    GetPlayerIp(giveplayerid,PlayerIP,sizeof(PlayerIP));

    if (pInfo[playerid][pAdmin] < 1)
    {
        SystemMessage(playerid, "You are not an Administrator with the required level.");
        return 1;
    }

    new string[MAX_STRING];
    if (IsPlayerConnected(giveplayerid))
    {
        playermoney = GetPlayerMoney(giveplayerid);
        format(string, sizeof(string), "Name: %s | ID: %d | Money: $%d | Weapon(s): | Health: %.1f | Armour: %.1f | IP: %s ", PlayerName(giveplayerid), giveplayerid, playermoney,, pWeapons, pHealth, pArmour, PlayerIP);
        SystemMessage(playerid, string);
    }
    else
  {
        format(string, sizeof(string), "That player is not active.");
        SystemMessage(playerid, string);
    }
    return 1;
}
this command ain't working
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)