Goggles problem
#1

Hello
I am trying to make a pickup,what gives a Night vision goggle. The pickup is ok,but when I pick it up,it gives me nothing. (Its in a test fs)

pawn Код:
#include<a_samp>

public OnFilterScriptInit()
{
    AddStaticPickup(368,2,-412.0353,2235.6851,42.4297);
    return 1;
}
Reply
#2

Код:
new pickup_******;

public OnGameModeInit()
{
    pickup_****** = CreatePickup(368,2,-412.0353,2235.6851,42.4297, -1); 
    return 1;
}
 
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup_******)
    {
     GivePlayerWeapon(playerid, 45, 1);
    }
    return 1;
}
Reply
#3

The virtual world?

pawn Код:
AddStaticPickup(368,2,-412.0353,2235.6851,42.4297,-1);
If it still doesn't work, try with some other weapon and see whether that will work or not.
Reply
#4

EDIT: Try this.

pawn Код:
new NightVision;
 
public OnFilterScriptInit()
{
    NightVision = CreatePickup(368, 2, -412.0353, 2235.6851, 42.4297, -1);
    return true;
}
 
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == NightVision)
    {
        GivePlayerWeapon(playerid, 44, 1);
    }
    return ture;
}
Reply
#5

Quote:
Originally Posted by iZN
Посмотреть сообщение
Well you've forgotten something.

pawn Код:
new NightVision;
 
public OnFilterScriptInit()
{
    NightVision = CreatePickup(368, 2, -412.0353, 2235.6851, 42.4297, -1);
    return true;
}
 
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == NightVision)
    {
        GivePlayerWeapon(playerid, 44, 1);
    }
    return ture;
}
So this pickup can only be done with OnPlayerPickup?

It works fine this way,so thank you for the help everyone!
Reply
#6

Quote:
Originally Posted by RaptorX72
Посмотреть сообщение
So this pickup can only be done with OnPlayerPickup? [..]
No, AddStaticPickup gives automatically the weapons or health/armour.
Reply
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
No, AddStaticPickup gives automatically the weapons or health/armour.
Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The virtual world?

pawn Код:
AddStaticPickup(368,2,-412.0353,2235.6851,42.4297,-1);
If it still doesn't work, try with some other weapon and see whether that will work or not.
Well,addstaticpickup works with other weapons,like tec9,sawnoff or with health/armour and parachute.

Only goggles dont work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)