TonyVk

Bolnica

Nov 7th, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. new UBolnicu[MAX_PLAYERS];
  2.  
  3. new Float:RandomKreveti[][4] = //KOORDINATE KREVETA
  4. {
  5. {0, 0, 0, 0},
  6. {0, 0, 0, 0},
  7. {0, 0, 0, 0},
  8. {0, 0, 0, 0},
  9. {0, 0, 0, 0},
  10. {0, 0, 0, 0}
  11. };
  12.  
  13. forward IzasoIzBolnice(playerid);
  14. public IzasoIzBolnice(playerid)
  15. {
  16. TogglePlayerControllable(playerid,1);
  17. SetPlayerPos(playerid,1178.6914,-1323.6317,14.1326);
  18. SCM(playerid,GRAD2,"Uspjesno ste se izljecili i izasli iz bolnice!");
  19. return 1;
  20. }
  21.  
  22. public OnPlayerSpawn(playerid)
  23. {
  24. if(UBolnicu[playerid] == 1 && PlayerInfo[playerid][pZatvor] == 0)//NAJBOLJE DODATI PRI KRAJU TOG PUBLICA
  25. {
  26. SCM(playerid,GRAD2,"Lijecite se,pricekajte malo da izadjete iz bolnice!");
  27. new rand = random(sizeof(RandomKreveti));
  28. SetPlayerPos(playerid, RandomKreveti[rand][0], RandomKreveti[rand][1], RandomKreveti[rand][2]);
  29. SetPlayerFacingAngle(playerid,RandomKreveti[rand][3]);
  30. SetPlayerInterior(playerid, 0);
  31. TogglePlayerControllable(playerid, 0);
  32. SetTimerEx("IzasoIzBolnice",Min(2), false, "i", playerid);
  33. UBolnicu[playerid] = 0;
  34. }
  35. return 1;
  36. }
  37.  
  38. public OnPlayerDeath(playerid, killerid, reason)
  39. {
  40. UBolnicu[playerid] = 1;
  41. return 1;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment