Weapon stats help
#1

----
Reply
#2

pawn Код:
CMD:weaponstats(playerid,params[])
{
    for(new x; x < 13; x++)
    {
    GetPlayerWeaponData(playerid,x,PlayerInfo[playerid][pWeapons][x],PlayerInfo[playerid][pWeaponAmmo][x]);
    if(!PlayerInfo[playerid][pWeapons][x] && PlayerInfo[playerid][pWeaponAmmo][x] != 0)
    {
    new string[128],ammo;
    new weapon;
    ammo = PlayerInfo[playerid][pWeaponAmmo][x];
    weapon = PlayerInfo[playerid][pWeapons][x];
    format(string,sizeof(string),"[%s with %i ammo.]", aWeaponNames[weapon],ammo);
    SendClientMessage(playerid, COLOR_WHITE,string);
    }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by zxc1
Посмотреть сообщение
pawn Код:
CMD:weaponstats(playerid,params[])
{
    for(new x; x < 13; x++)
    {
    GetPlayerWeaponData(playerid,x,PlayerInfo[playerid][pWeapons][x],PlayerInfo[playerid][pWeaponAmmo][x]);
    if(!PlayerInfo[playerid][pWeapons][x] && PlayerInfo[playerid][pWeaponAmmo][x] != 0)
    {
    new string[128],ammo;
    new weapon;
    ammo = PlayerInfo[playerid][pWeaponAmmo][x];
    weapon = PlayerInfo[playerid][pWeapons][x];
    format(string,sizeof(string),"[%s with %i ammo.]", aWeaponNames[weapon],ammo);
    SendClientMessage(playerid, COLOR_WHITE,string);
    }
    }
    return 1;
}


Thanks for giving me the tip to change the == to != but I still had to remove the ! in front of PlayerInfo.

+rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)