SA-MP Forums Archive
Anti Car Troll Include problem - 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: Anti Car Troll Include problem (/showthread.php?tid=650749)



Anti Car Troll Include problem - C0oL3r - 05.03.2018

I have this anti car troll https://sampforum.blast.hk/showthread.php?tid=648109 and i receive warning 235: public function lacks forward declaration (symbol "OnPlayerCarTroll") after i put that function and i put at top of the gamemode #define ManualUse


Re: Anti Car Troll Include problem - RogueDrifter - 05.03.2018

Uhm...
Quote:
Originally Posted by RogueDrifter
Bud, you need to make sure the capital case is correct okay, its an include NOT a filterscript,

1- Download the include
2- Put it in pawno/includes
3- Open your gamemode
4- Put on TOP before anything #define ManualUse
5- Put under #include <a_samp> use #include <AntiCarTroll>
6- Use the callback at your gamemode
7- Include the same file in all of your filterscripts to link the hooked functions to the gamemode.

EDIT: The cheat you mentioned in the video is already detected in my include so use it and you'll be fine, you don't even have to use the callback it can do the kick/ban for you, just read my main post carefully and you'll understand everything.



Re: Anti Car Troll Include problem - C0oL3r - 05.03.2018

I already do all that thins.


Re: Anti Car Troll Include problem - RogueDrifter - 05.03.2018

Show me the top of ur gamemode, show me the #define and #include from your script.

You sure you're using the callback in your GAMEMODE not in a FILTERSCRIPT??


Re: Anti Car Troll Include problem - C0oL3r - 05.03.2018

Код:
#include <a_samp>
#include <AntiCarTroll>
#include <YSI\y_commands>
#include <YSI\y_master>
#include <YSI\y_iterate>
#include <YSI\y_timers>
#include <OPBA>
#include <fly>
#include <a_mysql>
#include <sscanf2>
#include <streamer>
#include <timestamptodate>
#include <geolocation>

//Defines///////////////////////////////////////
#define ManualUse
....
public OnPlayerCarTroll(playerid,vehicleid, trolledid, trolltype)
{
	return 1;
}
yes, it's all in gamemode not in a fs


Re: Anti Car Troll Include problem - RogueDrifter - 05.03.2018

See, you're wrong, you need to put #define ManualUse BEFORE #include <AntiCarTroll>

Bottom line, it should look like this:
Код:
#include <a_samp>
#define ManualUse
#include <AntiCarTroll>
#include <YSI\y_commands>
#include <YSI\y_master>
#include <YSI\y_iterate>
#include <YSI\y_timers>
#include <OPBA>
#include <fly>
#include <a_mysql>
#include <sscanf2>
#include <streamer>
#include <timestamptodate>
#include <geolocation>

....
public OnPlayerCarTroll(playerid,vehicleid, trolledid, trolltype)
{
	return 1;
}



Re: Anti Car Troll Include problem - C0oL3r - 05.03.2018

Oh, thanks!


Re: Anti Car Troll Include problem - RogueDrifter - 05.03.2018

You're welcome! enjoy kicking the troller's asses with it ^^