Advertisement
Sufyan

Pause Player

Aug 22nd, 2011
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.21 KB | None | 0 0
  1. //Top of your script
  2. new Text:Info;
  3.  
  4. //Under On Game Mode Init
  5.         Info = TextDrawCreate(139.000000, 170.000000, " ");
  6.     TextDrawAlignment(Info, 3);
  7.     TextDrawBackgroundColor(Info, 255);
  8.     TextDrawFont(Info, 1);
  9.     TextDrawLetterSize(Info, 0.500000, 1.000000);
  10.     TextDrawColor(Info, -1);
  11.     TextDrawSetOutline(Info, 0);
  12.     TextDrawSetProportional(Info, 1);
  13.     TextDrawSetShadow(Info, 1);
  14.     TextDrawUseBox(Info, 1);
  15.     TextDrawBoxColor(Info, 255);
  16.     TextDrawTextSize(Info, 0.000000, 0.000000);
  17.  
  18. //Top of Your script
  19. new Loaded[MAX_PLAYERS];
  20. forward LoadPlayer(playerid);
  21. //Any where
  22. stock Pause(playerid)
  23. {
  24.     TogglePlayerControllable(playerid,false);
  25.     TextDrawShowForPlayer(playerid,Info);
  26.     TextDrawSetString(Info, "Objects Loading.");
  27.     Loaded[playerid] = 1;
  28.     new Float:x, Float:y, Float:z;
  29.     GetPlayerPos(playerid, x, y, z);
  30.     SetPlayerPos(playerid,x,y,z+1);
  31.     SetTimer("LoadPlayer",3100,false);
  32.  
  33. }
  34.  
  35. public LoadPlayer(playerid)
  36. {
  37.     for(new i = 0; i < MAX_PLAYERS; i++)
  38.     {
  39.         if(IsPlayerConnected(i))
  40.         {
  41.             if(Loaded[i] == 1)
  42.             {
  43.             TextDrawSetString(Info, "Objects Loaded!!");
  44.             TogglePlayerControllable(i,true);
  45.             SetTimerEx("HideTD", 2000, false, "i", playerid);
  46.             Loaded[i] = 0;
  47.             }
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement