Flying weapon pickups - 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: Flying weapon pickups (
/showthread.php?tid=357658)
Flying weapon pickups -
RyanDam - 07.07.2012
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?
Re: Flying weapon pickups -
coole210 - 08.07.2012
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
Re: Flying weapon pickups -
RedJohn - 08.07.2012
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!