Posts: 2,322
Threads: 260
Joined: Jul 2010
Reputation:
0
Is there any way i can reset some players weapons slot, without reseting his whole weapons?
Like i want to remove his sawns, if he has some, but still keep the deagle, if he has any.
Get what im trying to say?
Posts: 815
Threads: 65
Joined: May 2010
GetPlayerWeaponData for every slot except for the shotgun, and store it into vars. ResetPlayerWeapons, then give the weapons from the vars.
Posts: 6,129
Threads: 36
Joined: Jan 2009
pawn Code:
stock RemoveWeaponFromSlot(playerid, iWeaponSlot) {
new weapons[13][2];
for(new i = 0; i < 13; i++)
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
weapons[iWeaponSlot][0] = 0;
ResetPlayerWeapons(playerid);
for(new i = 0; i < 13; i++)
GivePlayerWeapon(playerid, weapons[i][0], weapons[i][1]);
return 1;
}