Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*==============================================================================
- ========= Made By : J4mmyHD=====================================================
- =============================== JAFK System=====================================
- ============ DONT REMOVE CREDITS ===============================================
- ==============================================================================*/
- //==============================================================================
- // Includes
- //==============================================================================
- #include <a_samp>
- //==============================================================================
- // Makeing it a Filterscript
- //==============================================================================
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- //==============================================================================
- // The User Saves.
- //==============================================================================
- new Float:Health[MAX_PLAYERS];
- new Float:x, Float:y, Float:z;
- //==============================================================================
- // The Script
- //==============================================================================
- public OnFilterScriptInit()
- {
- print("========================================");
- print("============== JAFK System =============");
- print("========================================");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/afk", cmdtext, true, 10) == 0)
- {
- GetPlayerHealth(playerid, Health[playerid]);
- GetPlayerPos(playerid, x, y, z);
- SetPlayerHealth(playerid, 99999999999);
- SetPlayerPos(playerid, 0, 0, -90);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "AFK :{FFFFFF} You are now AKK! (use /back to play again!)");
- return 1;
- }
- if (strcmp("/back", cmdtext, true, 10) == 0)
- {
- SetPlayerHealth(playerid, Health[playerid]);
- SetPlayerPos(playerid, x, y, z);
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "AFK :{FFFFFF} You are no longer AFK, Welcome back!");
- return 1;
- }
- return 0;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement