Guest User

Untitled

a guest
Sep 27th, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.86 KB | None | 0 0
  1. #include <a_samp>
  2. #include <foreach>
  3.  
  4. #undef MAX_PLAYERS
  5. #define MAX_PLAYERS 40
  6.  
  7. forward OnPlayerLoad(playerid);
  8.  
  9. new isPlayerLoaded[MAX_PLAYERS];
  10.  
  11. main()
  12. {
  13. }
  14.  
  15. public OnPlayerConnect(playerid)
  16. {
  17.     isPlayerLoaded[playerid] = 0;
  18.     TogglePlayerSpectating(playerid, 1);
  19.     SetTimerEx("OnPlayerLoad", 5000, 0, "i", playerid);
  20.     GameTextForPlayer(playerid, "~w~Loading~n~Please wait", 10000, 3);
  21.     return 1;
  22. }
  23.  
  24. public OnPlayerLoad(playerid)
  25. {
  26.     if(!IsPlayerConnected(playerid)) return 0;
  27.    
  28.     isPlayerLoaded[playerid] = 1;
  29.     TogglePlayerSpectating(playerid, 0);
  30.     GameTextForPlayer(playerid, "~n~", 100, 3);
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerText(playerid, text[])
  35. {
  36.     foreach(new i : Player)
  37.     {
  38.         if(isPlayerLoaded[i]) SendPlayerMessageToPlayer(i, playerid, text);
  39.     }
  40.     return 0;
  41. }
  42.  
  43. public OnGameModeInit()
  44. {
  45.     SetGameModeText("Main Script");
  46.     return 1;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment