Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Sulietuvino; Ern'Update
- /* AFK System by Flaken Please keep this credit and do not remove anything or repost it on the internet.
- You may edit and change the materials but do not not provide this material to others without any circumstances** */
- #include <a_samp>
- new Showing[MAX_PLAYERS];
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_LIME 0x10F441AA
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_NAVY 0x000080AA
- #define COLOR_AQUA 0xF0F8FFAA
- #define COLOR_CRIMSON 0xDC143CAA
- #define COLOR_FLBLUE 0x6495EDAA
- #define COLOR_BISQUE 0xFFE4C4AA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_CHARTREUSE 0x7FFF00AA
- #define COLOR_BROWN 0XA52A2AAA
- #define COLOR_CORAL 0xFF7F50AA
- #define COLOR_GOLD 0xB8860BAA
- #define COLOR_GREENYELLOW 0xADFF2FAA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_IVORY 0xFFFF82AA
- #define COLOR_LAWNGREEN 0x7CFC00AA
- #define COLOR_SEAGREEN 0x20B2AAAA
- #define COLOR_LIMEGREEN 0x32CD32AA
- #define COLOR_MIDNIGHTBLUE 0X191970AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OLIVE 0x808000AA
- #define COLOR_ORANGERED 0xFF4500AA
- #define COLOR_PINK 0xFFC0CBAA
- #define COLOR_SPRINGGREEN 0x00FF7FAA
- #define COLOR_TOMATO 0xFF6347AA
- #define COLOR_YELLOWGREEN 0x9ACD32AA
- #define COLOR_MEDIUMAQUA 0x83BFBFAA
- #define COLOR_MEDIUMMAGENTA 0x8B008BAA
- #define COL_EASY "{FFF1AF}"
- #define COL_WHITE "{FFFFFF}"
- #define COL_BLACK "{0E0101}"
- #define COL_GREY "{C3C3C3}"
- #define COL_GREEN "{6EF83C}"
- #define COL_RED "{F81414}"
- #define COL_YELLOW "{F3FF02}"
- #define COL_ORANGE "{FFAF00}"
- #define COL_LIME "{B7FF00}"
- #define COL_CYAN "{00FFEE}"
- #define COL_LIGHTBLUE "{00C0FF}"
- #define COL_BLUE "{0049FF}"
- #define COL_MAGENTA "{F300FF}"
- #define COL_VIOLET "{B700FF}"
- #define COL_PINK "{FF00EA}"
- #define COL_MARONE "{A90202}"
- #define COL_CMD "{B8FF02}"
- #define COL_PARAM "{3FCD02}"
- #define COL_SERVER "{AFE7FF}"
- #define COL_VALUE "{A3E4FF}"
- #define COL_RULE "{F9E8B7}"
- #define COL_RULE2 "{FBDF89}"
- #define COL_RWHITE "{FFFFFF}"
- #define COL_LGREEN "{C9FFAB}"
- #define COL_LRED "{FFA1A1}"
- #define COL_LRED2 "{C77D87}"
- #define red 0xFF0000AA
- #define yellow 0xFFFF00AA
- new Text:Textdrawu;
- new Text:Textdraws;
- new Text:Textdrawl;
- public OnFilterScriptInit()
- {
- // Kuriame TextDraw'us:
- Textdrawu= TextDrawCreate(412.000000, 436.000000, " ");
- TextDrawBackgroundColor(Textdrawu, 255);
- TextDrawFont(Textdrawu, 1);
- TextDrawLetterSize(Textdrawu, 0.360000, 0.899999);
- TextDrawColor(Textdrawu, 16711935);
- TextDrawSetOutline(Textdrawu, 0);
- TextDrawSetProportional(Textdrawu, 1);
- TextDrawSetShadow(Textdrawu, 1);
- Textdraws = TextDrawCreate(177.000000, 166.000000, "Rašyk /esu norėdamas palikti AFK.");
- TextDrawBackgroundColor(Textdraws, 255);
- TextDrawFont(Textdraws, 1);
- TextDrawLetterSize(Textdraws, 0.850000, 6.800000);
- TextDrawColor(Textdraws, 16711935);
- TextDrawSetOutline(Textdraws, 1);
- TextDrawSetProportional(Textdraws, 1);
- Textdrawl = TextDrawCreate(272.000000, 151.000000, "AFK");
- TextDrawBackgroundColor(Textdrawl, 255);
- TextDrawFont(Textdrawl, 1);
- TextDrawLetterSize(Textdrawl, 0.500000, 3.099999);
- TextDrawColor(Textdrawl, -16776961);
- TextDrawSetOutline(Textdrawl, 1);
- TextDrawSetProportional(Textdrawl, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawHideForAll(Textdrawu);
- TextDrawDestroy(Textdrawu);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- Showing[playerid] = 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/afk") && Showing[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_LIME, "Nuo dabar tu esi AFK! Norėdamas sugrįžti rašyk /esu");
- TogglePlayerControllable(playerid,0);
- new newtext[41], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- format(newtext, sizeof(newtext), "%s dabar yra AFK!", name);
- TextDrawSetString(Textdrawu, newtext);
- SetPlayerChatBubble(playerid, "AFK!", COLOR_RED, 100.0, 1000000);
- TextDrawShowForAll(Textdrawu);
- TextDrawShowForPlayer(playerid, Textdraws);
- TextDrawShowForPlayer(playerid, Textdrawl);
- SetTimerEx("HideTextdraws", 3000, 0, "i", playerid);
- return 1;
- }
- if(strcmp(cmdtext,"/esu",true) == 0)
- {
- TextDrawHideForPlayer(playerid, Textdraws);
- TextDrawHideForPlayer(playerid, Textdrawl);
- TogglePlayerControllable(playerid,1);
- SetPlayerChatBubble(playerid, "Back!", COLOR_RED, 100.0, 10000);
- SendClientMessage(playerid,COLOR_LIME, "Jūs grįžote iš afk, sėkmės žaidime.");
- return 1;
- }
- return 0;
- }
- forward HideTextdraws(playerid);
- public HideTextdraws(playerid)
- {
- Showing[playerid] = 0;
- TextDrawHideForAll(Textdrawu);
- }
Advertisement
Add Comment
Please, Sign In to add comment