SA-MP Forums Archive
OnPlayerPickUpPickup not working? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerPickUpPickup not working? (/showthread.php?tid=65452)



OnPlayerPickUpPickup not working? - NovaParadox - 12.02.2009

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	SendClientMessage(playerid, COLOR_WHITE, "test");
	return 1;
}
Something isn't right here, I use both AddStaticPickup and CreatePickup, neither seem to work. I've tried using pickup types 2 and 23. Any idea whats causing this?


Re: OnPlayerPickUpPickup not working? - mirkoiz - 12.02.2009

you need to define the Pickup!

pawn Код:
new pickup1;

OnGamemodeInit(plaplapla)
{
   pickup1 = AddStaticPickup(plaplapla);
}

OnPlayerPickUpPickup(playerid, pickupid(
{
  if(pickupid == pickup1)
  {
    //your things here
  }
}



Re: OnPlayerPickUpPickup not working? - NovaParadox - 12.02.2009

actually, i wound up renaming the pwn file... and forgot to rename the gamemode to use in the server cfg... I changed it and it works now, simple brain fart


Re: OnPlayerPickUpPickup not working? - mirkoiz - 12.02.2009

hehe