Reset weapon slot
#1

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?
Reply
#2

GetPlayerWeaponData for every slot except for the shotgun, and store it into vars. ResetPlayerWeapons, then give the weapons from the vars.
Reply
#3

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)