Why my command isnt launching?
#1

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;
}
Reply
#2

Remove one of the printf thing and add the filterscript name in server.cfg
Reply
#3

No, not working,
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)