Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- [FS]Away From Keyboard
- Provided By, Akira297
- SA:MP Forums
- */
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" [FS]Away From Keyboard");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Closing-[FS]Away From Keyboard");
- print("----------------------------------\n");
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/afk", cmdtext, true, 4) == 0)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, 24);
- SendClientMessage(playerid, 0xFF0000AA, "You have left your keyboard..");
- SetPlayerVirtualWorld(playerid, 1337);
- TogglePlayerControllable(playerid, 0);
- return 1;
- }
- if (strcmp("/back", cmdtext, true, 5) == 0)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, 24);
- SendClientMessage(playerid, 0xFF0000AA, "You've returned to your key-board continue your game-play.");
- SetPlayerVirtualWorld(playerid, 0);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- return 0;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment