Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ***TiiX's Afk System***
- #include <a_samp>
- #define COLOR_YELLOW 0xFFFF00AA
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n-----------------------------------------");
- print(" AFK Filterscript Created by TiiX ");
- print("----------------------------------------\n-");
- return true;
- }
- public OnFilterScriptExit()
- {
- return true;
- }
- #else
- main()
- {
- print("\n-----------------------------------------");
- print(" Afk Filterscript Created by TiiX ");
- print("-----------------------------------------\n");
- }
- #endif
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/afk", true) == 0) {
- new pName[MAX_PLAYER_NAME];
- new string [48];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "You are AFK");
- SendClientMessage(playerid,COLOR_YELLOW, string);
- format(string, sizeof(string), "%s, %d is AFK)", pName);
- SendClientMessageToAll(COLOR_YELLOW, string);
- TogglePlayerControllable(playerid,0);
- return true;
- }
- if(strcmp(cmdtext, "/back", true) == 0) {
- new pName[MAX_PLAYER_NAME];
- new string[48];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "You are back");
- SendClientMessage(playerid,COLOR_YELLOW, string);
- format(string, sizeof(string), "%s, %d is back", pName);
- SendClientMessageToAll(COLOR_YELLOW, string);
- TogglePlayerControllable(playerid,1);
- return true;
- }
- if(strcmp(cmdtext, "/brb", true) == 0) {
- new pName[MAX_PLAYER_NAME];
- new string [48];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "You will be right back");
- SendClientMessage(playerid,COLOR_YELLOW, string);
- format(string, sizeof(string), "%s, %d will be right back)", pName);
- SendClientMessageToAll(COLOR_YELLOW, string);
- TogglePlayerControllable(playerid,0);
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment