Can someone explain this, Just using comments?
#1

I would like to understand what this is actually doing....I want to know how RemovePlayerWeapon works, I will code my own if someone could explain the pseudocode.


pawn Код:
RemovePlayerWeapon(playerid, weaponid)
{
    new plyWeapons[13];
    for(new s = 0; s < 12; s++)
    {
        new wep, ammo;
        GetPlayerWeaponData(playerid, s, wep, ammo);

        if(wep != weaponid)
        {
            GetPlayerWeaponData(playerid, s, plyWeapons[s], ammo);
        }
        else
        {
            PlayerInfo[playerid][pGuns][s] = 0;
            PlayerInfo[playerid][pAGuns][s] = 0;
        }
    }

    ResetPlayerWeapons(playerid);
    for(new s = 0; s < 12; s++)
    {
        GivePlayerValidWeapon(playerid, plyWeapons[s], 60000);
    }
    return 1;
}
Reply


Messages In This Thread
Can someone explain this, Just using comments? - by Dokins - 08.12.2011, 10:48
Re: Can someone explain this, Just using comments? - by Rob_Maate - 08.12.2011, 11:33
Re: Can someone explain this, Just using comments? - by Dokins - 08.12.2011, 12:26

Forum Jump:


Users browsing this thread: 1 Guest(s)