GivePlayerWeapon problem
#1

I am making a menu for cops to get a weapon,
I have finished and added the GivePlayerWeapon
Although when i go on the server and open up the menu,
And i select one of the weapons, I do not recieve anything,
Can anyone help?

pawn Код:
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == Weaponmenu)
{
  switch(row)
  {
    case 0: //Teargas
    {
            GivePlayerWeapon(playerid, 343, 10);
            GivePlayerWeapon(playerid, 335, 500);
      SendClientMessage(playerid, 0xFFFFFFFF, "You have recieved your weapon with a bonus nitestick");
    }
    case 1: //Silenced 9mm
    {
      GivePlayerWeapon(playerid, 347, 500);
      GivePlayerWeapon(playerid, 335, 500);
      SendClientMessage(playerid, 0xFFFFFFFF, "You have recieved your weapon with a bonus nitestick");
    }
    case 2: //AK47
    {
      GivePlayerWeapon(playerid, 355, 500);
      GivePlayerWeapon(playerid, 335, 500);
      SendClientMessage(playerid, 0xFFFFFFFF, "You have recieved your weapon with a bonus nitestick");
    }
    case 3: //Shotgun
    {
      GivePlayerWeapon(playerid, 349, 500);
      GivePlayerWeapon(playerid, 335, 500);
      SendClientMessage(playerid, 0xFFFFFFFF, "You have recieved your weapon with a bonus nitestick");
    }
    case 4: //Combat Rifle
    {
      GivePlayerWeapon(playerid, 357, 500);
      GivePlayerWeapon(playerid, 335, 500);
      SendClientMessage(playerid, 0xFFFFFFFF, "You have recieved your weapon with a bonus nitestick");
    }
    case 5: //Parachute
    {
      GivePlayerWeapon(playerid, 371, 1);
      GivePlayerWeapon(playerid, 335, 500);
      SendClientMessage(playerid, 0xFFFFFFFF, "You have recieved your weapon with a bonus nitestick");
    }
  }
}
Reply
#2

You've used the wrong weapon ids. The ones around the 300 mark are the model id's. You need the ones from ~1 to ~ 46.

Look here: https://sampwiki.blast.hk/wiki/Weapons
Reply
#3

Just a note:

pawn Код:
teargas != synced;
return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)