Advertisement
Guest User

Untitled

a guest
Jan 12th, 2014
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. addEvent('onClientMapStarting', true)
  2. addEventHandler('onClientMapStarting', getRootElement(),
  3. function(mapinfo)
  4. vgRespawnOnMapStart(mapinfo)
  5. end
  6. )
  7.  
  8. addEvent('onClientMapStopping', true)
  9. addEventHandler('onClientMapStopping', getRootElement(),
  10. function()
  11. respawnEnabled = false
  12. end
  13. )
  14.  
  15. function string.findIgnoreCase(haystack,needle)
  16. return string.find(string.lower(haystack),string.lower(needle),1,true)
  17. end
  18.  
  19.  
  20. function vgRespawnOnMapStart(mapinfo)
  21. if string.findIgnoreCase(mapinfo.name,"[DM]") then
  22. respawnEnabled = true
  23. end
  24. if string.findIgnoreCase(mapinfo.name,"[DD]") then
  25. respawnEnabled = false
  26. end
  27. if string.findIgnoreCase(mapinfo.name,"[HUNTER]") then
  28. respawnEnabled = false
  29. end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement