30.07.2009, 23:44
Things You Will Need:
Pawno
Simple Knowledge
Simple Command Knowledge
SA:MP
and
A Motivation To Script.
Step 1
Go To The Top of Your Script, here you will see your includes
and so on
under that Type
(you can change deagle to whatever you want)
Step 2
Make sure you have the x,y,z coordinates for your pickup next
under
and after the {
type this
Createpickup: Modelid Type x y z
(im my case it will be called deagle use the name You wrote on (new) on top of your script)
Step 3
Are you catching up?
find
once found under the public Onplayerpickuppickup
and under the {
type
Now in between
Type Your Command, You can find commands here,
https://sampwiki.blast.hk/wiki/Category:Scripting_Functions
So This what I would do for the Deagle
Then in Game goto the pickup you created, where your X,y,z spot was supposed to be and goto the pickup and you will get a Deagle with 500 ammo.
Thats it simple and easy.
Pawno
Simple Knowledge
Simple Command Knowledge
SA:MP
and
A Motivation To Script.
Step 1
Go To The Top of Your Script, here you will see your includes
Code:
#include <a_samp>
under that Type
Code:
new deagle;
Step 2
Make sure you have the x,y,z coordinates for your pickup next
under
Code:
public OnGameModeInit()
type this
Code:
deagle = CreatePickup( 1239,1,-384.7508,2206.4153,42.4236 );
Code:
Available Pickup Types 0 The pickup does not display. 1 Not pickupable, exists all the time. 2 Pickupable, respawns after some time. 3 Pickupable, but doesn't respawn. 4 Disappears shortly after created (perhaps for weapon drops?) 5 Disappears shortly after created (perhaps for weapon drops?) 8 Pickupable, but has no effect. Disappears automatically. 11 Blows up a few seconds after being created (bombs?) 12 Blows up a few seconds after being created. 13 Slowly decends to the ground. 14 Pickupable, but only when in a vehicle. Falls through objects made with CreateObject, etc. 15 Pickupable, but doesn't respawn. 19 Pickupable, but has no effect (information icons?) 22 Pickupable, but doesn't respawn. 23 Pickupable, but doesn't disappear on pickup.
Step 3
Are you catching up?
find
Code:
public OnPlayerPickUpPickup(playerid, pickupid) { return 1; }
and under the {
type
Code:
if(pickupid == Deagle) { return 1; }
Code:
{ return 1;
https://sampwiki.blast.hk/wiki/Category:Scripting_Functions
So This what I would do for the Deagle
Code:
if(pickupid == Deagle) { GivePlayerWeapon(playerid, 24, 500); //Give playerid Deagle with 500 ammo return 1; }
Thats it simple and easy.