Why my command isnt launching? - 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: Why my command isnt launching? (
/showthread.php?tid=467063)
Why my command isnt launching? [Giving +Rep] -
Alex_Obando - 01.10.2013
Hey guys,
I made this little test command and it wouldnt launch it to my server....
Any clues?
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hey", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
printf("I'm home");
printf("I'm home");
return 1;
}
return 0;
}
Re: Why my command isnt launching? -
efrim123 - 01.10.2013
Remove one of the printf thing and add the filterscript name in server.cfg
Respuesta: Why my command isnt launching? -
Alex_Obando - 01.10.2013
No, not working,
Re: Why my command isnt launching? -
Mattakil - 01.10.2013
pawn Код:
#include <a_samp>
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hey", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
printf("I'm home");
printf("I'm home");
return 1;
}
return 0;
}
You had it set to do the command if it was defined as a filterscript, but the #define filterscript was commented out. Removed the following
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#if defined FILTERSCRIPT