SA-MP Forums Archive
OnPlayerPickUpPickup - 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: OnPlayerPickUpPickup (/showthread.php?tid=370456)



OnPlayerPickUpPickup - Shetch - 20.08.2012

The OnPlayerPickUpPickup doesn't get called even if i walk on the pickup?

Код:
DealershipPickups[0] = CreateDynamicPickup(1239, 1, 2131.7966,-1149.4606,24.2644);
DealershipPickups[1] = CreateDynamicPickup(1239, 1, 542.2528,-1291.5217,17.2422);
DealershipPickups[2] = CreateDynamicPickup(1239, 1, 1663.7601,-1862.7172,13.5274);

public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == DealershipPickups[0] || pickupid == DealershipPickups[1] || pickupid == DealershipPickups[2])
	{
 		SendClientMessage(playerid, COLOR_GREEN, "INFO: You can access the dealership by typing '/dealership'.");
	}
	return 1;
}



Re: OnPlayerPickUpPickup - McCurdy - 20.08.2012

Hem, i have been in search and i got this:

Try to change OnPlayerPickUpPickup to OnPlayerPickUpDynamicPickup <= because you using CreateDynamicPickup (that what i got in this forum)


Re: OnPlayerPickUpPickup - Backwardsman97 - 20.08.2012

CreateDynamicPickup isn't a native function. You need to use whatever callback was made for that function. Probably what curdy said.


Re: OnPlayerPickUpPickup - Shetch - 20.08.2012

Yup, fixed it by myself, but thanks for the help anyway!
The problem was exactly what you two said.
Repped.