Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////
- /////////////////////////////Simple AFK System//////////////////////////////////
- ////////////////////////////////By RedWingz/////////////////////////////////////
- /////////////////////////////////14/05/12///////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- #include <a_samp>
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xCC0000AA
- #define COLOR_YELLOW 0xFFFF00AA
- public OnFilterScriptInit()
- {
- print("\n======================================");
- print(" Simple AFK System by RedWingz");
- print(" 14/05/12");
- print("========================================\n");
- return 1;
- }
- #endif
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/afk", cmdtext, true, 10) == 0)
- {
- TogglePlayerControllable(playerid, 0); //This freezes the player//
- SetPlayerVirtualWorld(playerid, 1); //This moves the player to another virtual world//
- SetPlayerHealth(playerid, 9999999); //Makes the player invincible//
- SendClientMessage(playerid, COLOR_GREEN, "You are now AFK. Type /back when you are back!");
- return 1;
- }
- if(strcmp("/back", cmdtext, true, 10) == 0)
- {
- TogglePlayerControllable(playerid, 1); //This unfreezes the player//
- SetPlayerVirtualWorld(playerid, 0); //This moves the player to the default virtual world//
- SetPlayerHealth(playerid, 100); //Makes the player vincible again//
- SendClientMessage(playerid, COLOR_GREEN, "You are no longer AFK.");
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment