Pickup Help!!!
#1

I created a pickup and i'm not seeing it. (my positions are correct) XYZ coord

here's my code:
Код:
new healthpickup; 


public OnFilterScriptInit()
{

healthpickup = CreatePickup(1242, 23, 2240.7236,2449.3508,10.8203, 1); 
printf("healthpickup = %d", healthpickup);


public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == healthpickup)
    {
        GameTextForPlayer(playerid, "~w~Type ~r~/enter~w~ to go inside", 5000, 5);
       return 1;
    }
    return 1;
}
pickup won't load. :/
Reply
#2

pawn Код:
newhealthpickup;
There's no space between the new and the health pickup.

try this

pawn Код:
new healthpickup;
Reply
#3

pawn Код:
new healthpickup;


public OnFilterScriptInit()
{
   healthpickup = CreatePickup(1242, 23, 2240.7236,2449.3508,10.8203, 1);
   printf("healthpickup = %d", healthpickup);
   return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == healthpickup)
    {
        GameTextForPlayer(playerid, "~w~Type ~r~/enter~w~ to go inside", 5000, 5);
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by Skaizo
Посмотреть сообщение
pawn Код:
new healthpickup;


public OnFilterScriptInit()
{
   healthpickup = CreatePickup(1242, 23, 2240.7236,2449.3508,10.8203, 1);
   printf("healthpickup = %d", healthpickup);
   return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == healthpickup)
    {
        GameTextForPlayer(playerid, "~w~Type ~r~/enter~w~ to go inside", 5000, 5);
    }
    return 1;
}
Thanks i know it was a typing error.. that's not the issue. The problem still persist. Thanks anyway
Reply
#5

Try changing virtual world to -1
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
This implies you didn't copy and paste the code, but instead rewrote it. That's never a good idea because sometimes the original may be wrong but the rewritten version on the forums is actually correct, leading people to be unable to find the bug at all.
****** believe in copy paste :O :O
Reply
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
This implies you didn't copy and paste the code, but instead rewrote it. That's never a good idea because sometimes the original may be wrong but the rewritten version on the forums is actually correct, leading people to be unable to find the bug at all.
Thanks here the code:


Код:
new healthpickup;


public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" blah blah blah LOADED!!!!");
	print("--------------------------------------\n");

	healthpickup = CreatePickup(1242, 23, 2240.7236,2449.3508,10.8203, 1); 
	printf("healthpickup = %d", healthpickup);

	return 1;
}


public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == healthpickup)
    {
        GameTextForPlayer(playerid, "~w~Type ~r~/enter~w~ to go inside", 5000, 5);
        return 1;
    }
    return 1;
}
Reply
#8

The easy way is: AddStaticPickup(1242, 2, x.y.z);

And the number 2 after 1242 can u change in what u want

https://sampwiki.blast.hk/wiki/PickupTypes
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)