SA-MP Forums Archive
OnPlayerPickUpDynamicPickup - don't work - why? - 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: OnPlayerPickUpDynamicPickup - don't work - why? (/showthread.php?tid=360971)



OnPlayerPickUpDynamicPickup - don't work - why? - Crazzel - 19.07.2012

Hi everybody.
I have problem...
I was created one dynamic pickup - streamer plugin.

On top:
Код:
new kupno[5];
On public game mode init:
Код:
kupno[0] = CreateDynamicPickup(1274, 1, -1657.8188, 1210.8721, 7.2500, 0, 0, -1, 15.0);
And on PickUp
Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
	if(pickupid == kupno[0])//salon
	{
		ShowPlayerDialog(playerid, DIALOG_INFO, DIALOG_STYLE_MSGBOX, ""kzo"Cars - sporting", "Write /buy for buy a car.", "Buy", "Cancel");
		SendClientMessage(playerid, -1, "yyy2");
	}
	return 1;
}
What's wrong?
Because when I pick up kupno[0] - nothing happens.



Sorry for my English


Re: OnPlayerPickUpDynamicPickup - don't work - why? - Crazzel - 19.07.2012

Refresh...

Please help me :[


Re: OnPlayerPickUpDynamicPickup - don't work - why? - nepstep - 19.07.2012

What streamer you are using?


Re: OnPlayerPickUpDynamicPickup - don't work - why? - Crazzel - 19.07.2012

This:
https://sampforum.blast.hk/showthread.php?tid=102865/

version v2.6.1


Re: OnPlayerPickUpDynamicPickup - don't work - why? - nepstep - 19.07.2012

Weird..
Its working for me..
pawn Код:
#include <a_samp>
#include <streamer>

main()
{
}

new kupno[5];
public OnPlayerConnect(playerid)
{
SpawnPlayer(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid,-1650,1206,7.25);
return 1;
}
public OnGameModeInit()
{
kupno[0] = CreateDynamicPickup(1274, 1, -1657.8188, 1210.8721, 7.2500, 0, 0, -1, 15.0);
}
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    if(pickupid == kupno[0])//salon
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Cars - sporting", "Write /buy for buy a car.", "Buy", "Cancel");
        SendClientMessage(playerid, -1, "yyy2");
    }
    return 1;
}
Try this test gamemode and see if it works for you


Re: OnPlayerPickUpDynamicPickup - don't work - why? - Crazzel - 19.07.2012

When you enter to kupno pickup - turns on dialog and text "yyy2"?

When i enter to pickup - nothing happens :/


Re: OnPlayerPickUpDynamicPickup - don't work - why? - nepstep - 19.07.2012

Yes it does, you tested with my script and nothing?


Re: OnPlayerPickUpDynamicPickup - don't work - why? - Crazzel - 19.07.2012

Working!
My mistake because I was using an older streamer version...


Re: OnPlayerPickUpDynamicPickup - don't work - why? - nepstep - 19.07.2012

I was about to say you are using something outdated, haha
Good luck anyway!