Flying weapon pickups
#1

Hello, I tried to find a thread regarding flying weapon pickups with roatation, but cant find them anywhere, anyone who might wish to help me?
Reply
#2

Create pickup:

https://sampwiki.blast.hk/wiki/CreatePickup

Weapon pickup models:

https://sampwiki.blast.hk/wiki/Game_Obje..._.28weapons.29

Callback to make pickups work:

https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup
Reply
#3

Hey RyanDam!
You could try this:

pawn Код:
#include <a_samp> // you already should have this



new GunPickup; // add this to your gamemode



public OnGameModeInit()
{
    GunPickup = CreatePickup(350, 2, 1172.6287,-1328.0294,15.4028, -1); // You need this to tell your server where he will create pickup, 350 = gun model taken from [URL="https://sampwiki.blast.hk/wiki/Game_Object_ID_List#321-397_.28weapons.29"]link[/URL], 2 = pickup style taken from [URL="https://sampwiki.blast.hk/wiki/PickupTypes"]link[/URL], 1172.6287,-1328.0294,15.4028 = coordinates of your pickup (where it will be placed), -1 = to make the pickup show in all worlds.
    // rest of script
    return 1;
}


public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == GunPickup) // If player pick gun pickup (in our case shawoff) it will give him shawoff gun!
    {
        GivePlayerWeapon(playerid, 26, 500); // 26 = Gun ID taken from [URL="https://sampwiki.blast.hk/wiki/Weapons"]link[/URL], 500 = ammo
    }  
    return 1;
}
I think it will help you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)