weapons
#1

hi, i know you can lock cars and skins, but can you lock a weapon so that only i can use it?
Reply
#2

You could check under OnPlayerUpdate to see if they have whatever gun and remove it.
Reply
#3

but i dun them to be able to use it at all , hm. well do you have a script for that?
Reply
#4

pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerWeapon(playerid) == 38)
  {
    new Ammo[12];
    new Wep[12];
    for(new i = 0; i < 12; i++)
    {
      GetPlayerWeaponData(playerid, i+1, Wep[i], Ammo[i]);
      if(Wep[i] == 38)
      {
        GivePlayerWeapon(playerid, 38, -Ammo[i]);
        break;
      }
    }
  }
}
Tested and it worked for me, just replace 38(Weapon ID) with the weapon ID you don't want and you can add a check to see if the person is you or not.
Reply
#5

ty, im gonna test it asap. ill tell you if i get any problems
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)