GivePlayerWeapon problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GivePlayerWeapon problem (
/showthread.php?tid=79144)
GivePlayerWeapon problem -
JoeDaDude - 25.05.2009
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");
}
}
}
Re: GivePlayerWeapon problem -
Weirdosport - 25.05.2009
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
Re: GivePlayerWeapon problem -
DMSOrg - 26.05.2009
Just a note:
pawn Код:
teargas != synced;
return 1;