SA-MP Forums Archive
Sniper Weapon Pickup? - 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: Sniper Weapon Pickup? (/showthread.php?tid=68136)



Sniper Weapon Pickup? - Yuryfury - 07.03.2009

I made a sniper pick up at a DM location. It shows up and the script compiles without a problem but the weapon itself isnt picked up.

here is the code:

Код:
public OnGameModeInit()
{
	dm1sniper = CreatePickup(358,23,-861.0325,1536.7845,25.7377);
	return 1;
}



public OnPlayerPickUpPickup(playerid, pickupid)
{
	if (pickupid ==dm1sniper)
	{
		GivePlayerWeapon(playerid,358,1);
		return 1;
	}
	return 0;
}
Why don't I actually get the weapon?

Thanks in advance!


Re: Sniper Weapon Pickup? - Zoopaman - 07.03.2009

change
GivePlayerWeapon(playerid,358,1);
to
GivePlayerWeapon(playerid,34,1);

The second parameter is weaponid not modelid