/AFK System wont be marked on ServerFFS
#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


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)