/AFK System wont be marked on ServerFFS
#1

Hey, i just made my first Script! I know its easy.. But this is my first script.
So when i was gonna upload it on ServerFFS, and tryed to Enable it by Marking, it. Then i clicked Sace Configuration, it saved but my script wasnt marked anymore.
I got 0Errors when compiling. So here is my script.

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Mac's AFK System");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendMessage(playerid,RED, " Loading Mac's AFK System! ");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/AFK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now AFK!");
   
    if (strcmp("/BACK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now BACK!");
   
        return 1;
    }
    return 0;
}
#endif
Reply
#2

How did you not get any errors on that? Define your colors, and return 1 under the command "/AFK"
Reply
#3

Quote:
Originally Posted by Skylar Paul
Посмотреть сообщение
How did you not get any errors on that? Define your colors, and return 1 under the command "/AFK"
Eh here is my code now, still same problem

pawn Код:
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Mac's AFK System");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendMessage(playerid,GREEN, " Loading Mac's AFK System! ");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/AFK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now AFK! ");
   
    if (strcmp("/BACK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now BACK! ");
   
    }
    return 0;
}
#endif
0Bugs in Compile, and im a new scripter, sе if you can fix it. May you just fix it and set it in [pawn, or [Code]
Reply
#4

Bump, i need a fast asnwer please
Reply
#5

pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Mac's AFK System");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendMessage(playerid,GREEN, " Loading Mac's AFK System! ");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/AFK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now AFK! ");
   
    if (strcmp("/BACK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now BACK! ");
   
    }
    return 0;
}
Reply
#6

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
pawn Код:
#include <a_samp>

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Mac's AFK System");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,GREEN, " Loading Mac's AFK System! ");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/AFK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now AFK! ");
   
    if (strcmp("/BACK", cmdtext, true, 10) == 1)
    {
    SendClientMessage(playerid,ORANGE," %s is now BACK! ");
   
    }
    return 0;
}
Ok i get these Errors, About colors, but there isnt any problems with the colors?

Код:
C:\Users\Usman\Desktop\Mac's AFK System.pwn(18) : error 017: undefined symbol "GREEN"
C:\Users\Usman\Desktop\Mac's AFK System.pwn(27) : error 017: undefined symbol "ORANGE"
C:\Users\Usman\Desktop\Mac's AFK System.pwn(31) : error 017: undefined symbol "ORANGE"
C:\Users\Usman\Desktop\Mac's AFK System.pwn(37) : error 030: compound statement not closed at the end of file (started at line 24)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#7

This is how it should be..
pawn Код:
#include <a_samp>

#define COLOR_ONE 0xFF0000FF
#define COLOR_TWO 0x00FF00FF

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Mac's AFK System");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendMessage(playerid,GREEN, " Loading Mac's AFK System! ");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/AFK", cmdtext, true, 10) == 1)
    {
        new message[40], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));

        format(message,sizeof(message),"%s is now AFK!",name);
        SendClientMessage( playerid, COLOR_ONE, message);
        return 1;
    }

    if (strcmp("/BACK", cmdtext, true, 10) == 1)
    {
        new message[40], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));

        format(message,sizeof(message),"%s is now BACK!",name);
        SendClientMessage( playerid, COLOR_TWO, message);
        return 1;
    }
    return 0;
}
Untested, but this should work. You can learn scripting by spending your time on SAMP Forums/Wiki.
Goodluck!
Reply
#8

iPLEOMAX, you have defined "FILTERSCRIPT" when there is no need to.
Reply
#9

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
This is how it should be..
pawn Код:
#include <a_samp>

#define FILTERSCRIPT

#define COLOR_ONE 0xFF0000FF
#define COLOR_TWO 0x00FF00FF

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Mac's AFK System");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendMessage(playerid,GREEN, " Loading Mac's AFK System! ");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/AFK", cmdtext, true, 10) == 1)
    {
        new message[40], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));

        format(message,sizeof(message),"%s is now AFK!",name);
        SendClientMessage( playerid, COLOR_ONE, message);
        return 1;
    }

    if (strcmp("/BACK", cmdtext, true, 10) == 1)
    {
        new message[40], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));

        format(message,sizeof(message),"%s is now BACK!",name);
        SendClientMessage( playerid, COLOR_TWO, message);
        return 1;
    }
    return 0;
}
Untested, but this should work. You can learn scripting by spending your time on SAMP Forums/Wiki.
Goodluck!
Thanks for helping, but this WONT work. ServerFFS dont let it be Marked.

Btw i learned to script like you saw, by videos on *******
Reply
#10

Quote:
Originally Posted by jameskmonger
Посмотреть сообщение
iPLEOMAX, you have defined "FILTERSCRIPT" when there is no need to.
o_O I never knew that, lol. Thanks for the info.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)