07.07.2012, 23:22
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?
#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;
}