Guest User

Noobspawn?

a guest
Apr 10th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. -- Settings for when a player joins
  2. -- XYZ coördinates
  3. local joinX = -168.2039642334
  4. local joinY = 1032.8564453125
  5. local joinZ = 19.734413146973
  6. -- Weapon and ammo
  7. local joinWeapon = 0
  8. local joinAmmo = 0
  9. -- Message when player joins
  10. local joinMessage = "Willkommen bei Adventure Roleplay"
  11. -- Skin that player gets
  12. local joinSkin = 295
  13.  
  14. -- Settings for when a player dies
  15. -- XYZ coördinates
  16. local spawnX = -168.2039642334
  17. local spawnY = 1032.8564453125
  18. local spawnZ = 19.734413146973
  19. -- Weapon and ammo
  20. local spawnWeapon = 0
  21. local spawnAmmo = 0
  22. -- Skin that player gets
  23. local spawnSkin = 295
  24.  
  25. -- Settings for the amounts of money
  26. -- Money the killer gets
  27. local killerMoney = 0
  28. -- Money removed from player when they die
  29. local deadPlayerMoney = 0
  30. -- Money you get when you join
  31. local joinMoney = 0
  32.  
  33. -- Functions
  34. -- This function spawns players when they join
  35. function spawnOnJoin()
  36. spawnPlayer(source, -168.2039642334, 1032.8564453125, 19.734413146973, 0 , 295)
  37. fadeCamera(source, true)
  38. setCameraTarget(source, source)
  39. outputChatBox(joinMessage, source)
  40. giveWeapon(source, joinWeapon, joinAmmo)
  41. givePlayerMoney(source, joinMoney)
  42. end
  43.  
  44. -- This function spawns players after they died
  45. function spawnOnDead(ammo, killer, weapon, bodypart)
  46. outputChatBox(getPlayerName(source).." died.")
  47. takePlayerMoney(source, deadPlayerMoney)
  48. if (killer) and (killer ~= source) then
  49. givePlayerMoney(killer, killerMoney)
  50. end
  51. setTimer(spawnPlayer, 3000, 1, source, 168.2039642334, 1032.8564453125, 19.734413146973, 0, 295)
  52. setCameraTarget(source, source)
  53. setTimer(giveWeapon, 3000, 1, source, spawnWeapon, spawnAmmo)
  54. end
  55.  
  56. -- Event handlers
  57. addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin)
  58. addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead)
Advertisement
Add Comment
Please, Sign In to add comment