Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ****************************************CREDITS*INFORMATION*************************************************
- // [Basic] AFK System (Made by DJTunes)
- // Notice: This is my third filterscript, please don't be harsh
- // Notice: If you would like to edit/use my work, it'd be nice of you to contact me, before hand
- // Other FS's made by DJTunes: Welcome Message System, Credit System, Anti Team Kill Kick,
- // Other GM's made by DJTunes: Modern Warfare, Instant Warfare, Team Death Match,
- // ****************************************INCLUDES*************************************************
- #include <a_samp>
- // ****************************************DEFINES*************************************************
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_DBLUE 0x2641FEAA
- #define COLOR_ALLDEPT 0xFF8282AA
- // ******************************************SCRIPT*********************************************
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/afk", true) == 0)
- {
- new pName[MAX_PLAYER_NAME];
- new string[128];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string, sizeof(string), "---> #s now AFK!", pName);
- SendClientMessageToAll(COLOR_RED, string);
- TogglePlayerControllable(playerid, 0);
- SetPlayerHealth(playerid, 999999.99);
- return 1;
- }
- if(strcmp(cmdtext, "/back", true) == 0)
- {
- new pName[MAX_PLAYER_NAME];
- new string[128];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string, sizeof(string), "---> #s now back!", pName);
- SendClientMessageToAll(COLOR_GREEN, string);
- TogglePlayerControllable(playerid, 1);
- SetPlayerHealth(playerid, 100);
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment