08.12.2011, 10:48
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;
}