SA-MP Forums Archive
UF.inc Help - 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: UF.inc Help (/showthread.php?tid=379463)



UF.inc Help - admiralspeedy - 22.09.2012

Alright, I need to use some of the functions in uf.inc include. I have tried the original and the re-release one in this thread -> https://sampforum.blast.hk/showthread.php?tid=33459

Using that thread I followed the directions and was able to include it and compile it without any errors. I specifically need the "OnPlayerBuyPizza/Weapon/Etc" functions, but if I add them to my script, and go buy pizza or a weapon, they never get called.

Код:
public OnPlayerBuyWeapon(playerid,weaponid,cost)
{
	SendClientMessage(playerid, COLOR_WHITE, "TEST");
	return 1;
}
I put this just to test it, and if I call that with a command, it sends me the word "TEST", but if I go buy a weapon it doesn't get called. I know the uf.inc file is working, because it makes it so when you get into a vehicle, it shows the vehicle name in the corner for a second, and this does happen. Am I missing something? Do I have to define something? I have tried that as a public and a stock. PLEASE HELP!


Re: UF.inc Help - Backwardsman97 - 22.09.2012

That is a very old and out-dated include. It's not super efficient and has a lot of extra stuff in it if you just want it for one function. You'd probably be better off making what you need from it solo.