SecretBoss

Untitled

Dec 11th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. public loadObjects(playerid)
  2. {
  3. playerData[playerid][hasSpawned] = false;
  4. TogglePlayerControllable(playerid, 0);
  5.  
  6. PlayerTextDrawShow(playerid, playerData[playerid][objects][0]);
  7. PlayerTextDrawShow(playerid, playerData[playerid][objects][1]);
  8. PlayerTextDrawShow(playerid, playerData[playerid][objects][2]);
  9. PlayerTextDrawShow(playerid, playerData[playerid][objects][3]);
  10. playerData[playerid][objectsTimer] = SetTimerEx("objectsLoaded", 1500, false, "i", playerid);
  11.  
  12. if(!playerData[playerid][playerAdminDuty])
  13. {
  14. new Float:resetHealth;
  15. SetPlayerHealth(playerid, 1000);
  16. GetPlayerHealth(playerid, resetHealth);
  17. playerData[playerid][savedHealth] = resetHealth;
  18.  
  19. }
  20. }
  21.  
  22. public objectsLoaded(playerid)
  23. {
  24. PlayerTextDrawHide(playerid, playerData[playerid][objects][0]);
  25. PlayerTextDrawHide(playerid, playerData[playerid][objects][1]);
  26. PlayerTextDrawHide(playerid, playerData[playerid][objects][2]);
  27. PlayerTextDrawHide(playerid, playerData[playerid][objects][3]);
  28. playerData[playerid][hasSpawned] = true;
  29. TogglePlayerControllable(playerid, 1);
  30.  
  31. if(!playerData[playerid][playerAdminDuty])
  32. {
  33. SetPlayerHealth(playerid, playerData[playerid][savedHealth]);
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment