A function wich returns all the players weapons wont work.
#1

Hello there,

As the title says i made a little function that returns all the players weapons;
pawn Код:
stock GetAllPlayerWeapons(playerid)
{
    new weapons[13],ammo;

    for (new w = 0; w <= 12; w++)
    {
    GetPlayerWeaponData(playerid,w, weapons[w], ammo);
    }
    return 1;//weapons;
}
I am doing something wrong though because when i want to use the function in a command like here;
pawn Код:
new outcome[13];
        format(outcome,sizeof(outcome),"%d",GetAllPlayerWeapons(playerid));
        SendClientMessage(playerid,COLOR_GREEN,outcome);
it returns just a 0 or a 1...must be something wrong with the string im missing here i guess
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)