Guest User

Untitled

a guest
Apr 4th, 2010
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.33 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //                                                                            //
  3. //                                                                            //
  4. //                                                                            //
  5. //                                                                            //
  6. //                                                                            //
  7. //         SkiLLz aka JPs Brb script                                          //
  8. //                                                                            //
  9. //                 v2                                                         //
  10. //                                                                            //
  11. //                                                                            //
  12. //                                                                            //
  13. //                                                                            //
  14. //                                                                            //
  15. //                                                                            //
  16. //                                                                            //
  17. //                                                                            //
  18. ////////////////////////////////////////////////////////////////////////////////                                                                                                                                            //
  19.  
  20. #include <a_samp>
  21.  
  22. #define COLOR_YELLOW    0xFFFF00AA
  23. #define COLOR_GREEN     0x33AA33AA
  24.  
  25. #if defined FILTERSCRIPT
  26.  
  27. public OnFilterScriptInit()
  28. {
  29.     print("\n-----------------------------------------");
  30.     print(" Brb system loaded !! By JPs ");
  31.     print("----------------------------------------\n-");
  32.     return true;
  33. }
  34.  
  35. public OnFilterScriptExit()
  36. {
  37.     return true;
  38. }
  39.  
  40. #else
  41.  
  42. main()
  43. {
  44.     print("\n-----------------------------------------");
  45.     print(" brb System By JPs unloaded ");
  46.     print("-----------------------------------------\n");
  47. }
  48.  
  49. #endif
  50.  
  51. new Float:AFKpos[MAX_PLAYERS][3];
  52.  
  53. public OnPlayerCommandText(playerid, cmdtext[])
  54. {
  55.     if(strcmp(cmdtext, "/brb", true) == 0)
  56.     {
  57.         new pName[MAX_PLAYER_NAME];
  58.             new string[48];
  59.             SendClientMessage(playerid, COLOR_GREEN, "You are now AFK, to rejoin the game use /back");
  60.             GetPlayerName(playerid, pName, sizeof(pName));
  61.             format(string, sizeof(string), "%s is Away from keyboard!", pName);
  62.             SendClientMessageToAll(COLOR_YELLOW, string);
  63.         GetPlayerPos(playerid,AFKpos[playerid][0], AFKpos[playerid][1], AFKpos[playerid][2]);
  64.         TogglePlayerControllable(playerid,0);
  65.             SetPlayerPos(playerid,-1871.2036,780.8176,113.2891);
  66.         return 1;
  67.     }
  68.  
  69.     if(strcmp(cmdtext, "/back", true) == 0)
  70.     {
  71.         new pName[MAX_PLAYER_NAME];
  72.         new string[48];
  73.         GetPlayerName(playerid, pName, sizeof(pName));
  74.         format(string, sizeof(string), "Welcome back %s!");
  75.         SendClientMessage(playerid, COLOR_GREEN, string);
  76.         format(string, sizeof(string), "%s(ID:%d) is now back ", pName);
  77.         SendClientMessageToAll(COLOR_YELLOW, string);
  78.             TogglePlayerControllable(playerid,1);
  79.             SetPlayerPos(playerid,AFKpos[playerid][0], AFKpos[playerid][1], AFKpos[playerid][2]);
  80.         return 1;
  81.     }
  82.     return 0;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment