Guest User

Untitled

a guest
Dec 12th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. waitUntil {isDedicated || !isNull player};
  2.  
  3. if (isServer) then
  4. {
  5. TAG_fn_death =
  6. {
  7. if (TAG_deaths > 0) then
  8. {
  9. [nil,nil,rHint,format ["Tickets left : %1",TAG_deaths] call RE;
  10. }
  11. else
  12. {
  13. [nil,nil,rHint,"No more tickets left."] CALL RE;
  14. // nåt mer för att trigga spectate eller bara stänga uppdraget
  15. };
  16. };
  17.  
  18. "TAG_deaths" addPublicVariableEventHandler
  19. {
  20. call TAG_fn_death;
  21. };
  22. };
  23.  
  24. if (local player) then
  25. {
  26. player addEventHandler ["Respawn",
  27. {
  28. TAG_deaths = TAG_deaths - 1;
  29. if (isServer) then
  30. {
  31. call TAG_fn_death;
  32. }
  33. else
  34. {
  35. publicVariableServer "TAG_deaths"
  36. };
  37. }];
  38. };
Add Comment
Please, Sign In to add comment