How can i make a 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)
+--- Thread: How can i make a pickup ? (
/showthread.php?tid=475382)
How can i make a pickup ? -
Le3aT - 12.11.2013
Please can someone tell me how to make a pickup without errors Step by Step defining the words
Thanks
Re: How can i make a pickup ? -
Lynn - 12.11.2013
pawn Код:
CreatePickup(MID, type, X, Y, Z, VW); // VW(VirtualWorld) Is Optional
First, you'll need the MID or Model ID.
You can find a list of available ones here:
http://weedarr.wikidot.com/pickups
Next, you will need to declare the type.
List found here:
https://sampwiki.blast.hk/wiki/PickupTypes
As for the X, Y, Z that's the Floats, you can go In-Game, and /save at the point you want it at then goto:
Documents > GTA San Andreas User Files > SAMP > Savedpositions
It will look something like this:
pawn Код:
AddPlayerClass(0,-1112.4480,-1637.2107,76.3672,90.8210,0,0,0,0,0,0);
Код:
-1112.4480 = Y
-1637.2107 = X
76.3672 = Z
Re: How can i make a pickup ? -
Areax - 12.11.2013
Here is a good example:
pawn Код:
new GunPickup; // At the top of your script
Under OnGameModeInit()
pawn Код:
GunPickup = CreatePickup(356, 2, 1958.3783, 1343.1572, 15.3746, -1) // This will create a pickup. This are just random coordinates
To see more click
here.
OnPlayerPickUpPickup(playerid, pickupid)
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == GunPickup) // If the pickup is the pickup we have created..
{ // then..
GivePlayerWeapon(playerid, 31, 500); // Give player a weapon (M4 with 500 bullets)
}
return 1;
}
That's all