How can i make a pickup ?
#1

Please can someone tell me how to make a pickup without errors Step by Step defining the words


Thanks
Reply
#2

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
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)