OnPlayerPickUpPickup in include - 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 in include (
/showthread.php?tid=662181)
OnPlayerPickUpPickup in include -
NoteND - 25.12.2018
Hey!
I'm currently working on include, and I've added
forward OnPlayerPickUpPickup(playerid, pickupid);
public OnPlayerPickUpPickup(playerid, pickupid)
...
In it, but for some reason even tho pickups are created, it doesnt make the sound of getting picked up, neither does give me what I wrote in code which is nitro. What could be problem? should I define it differently because its include or ?
Re: OnPlayerPickUpPickup in include -
NaS - 25.12.2018
The forward should be unneccessary as it's already forwarded in the SAMP includes.
You can put callbacks in includes just like anywhere else, but you should hook it instead of defining the original one in the include (you cannot have the same callback 2 times in one script, so having two includes that use the same callback will give you an error - includes aren't seperate scripts if you include both in one script (obviously)).