2 pickup problems - 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: 2 pickup problems (
/showthread.php?tid=107692)
2 pickup problems -
Freddy Z - 10.11.2009
Here is the script
new weapon;
new jetpack;
new jetpacktwo;
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == weapon)
{
GivePlayerWeapon(playerid,36, 5); // 36 is a heat seek rocket launcher and 5 is the ammo
}
else if (pickupid == jetpack)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK);
}
else if (pickupid == jetpacktwo)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USE JETPACK);
}
return 1;
}
public OnGameModeInit()
{
weapon = AddStaticPickup(360, 2, 47.8186,-256.2100,1.6644, -1);
jetpack = AddStaticPickup(370,2,19965.1035,-1496.4868,6.5784,-1);
jetpacktwo= AddStaticPickup(370,2,-78.8936,-302.7246,1.4219,-1);
return 1;
}
when i tested it on my server, i picked up the rocket launcher but i didn't get 5 ammo! i got 3! why?
The other problem is that i can't see any kind of pickups very far away in the ocean
Re: 2 pickup problems -
Freddy Z - 11.11.2009
Does this script seem right? cause i don't get why it doesn't work!