Advertisement
serfma

Untitled

Aug 15th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. def playerEnteredLockedVehicle( player, vehicle ):
  2. #This WILL work. It warns the player the moment they enter a restricted vehicle, after 2 warns (5 sec interval) it will slay them.
  3. warns = 0
  4. def warnPly():
  5. if 'warnTimer' in locals():
  6. warnTimer.destroy()
  7. warnTimer = None
  8. if warnUserAsset:
  9. try:
  10. if (warns == 2):
  11. RA.PlayerKill('kill', [player.getName(), 'There are not enough players on the server to use this asset! (Minimum ' + str(minForAssets) + ')' ], None)
  12. break
  13. RA.PlayerWarn('warn', [player.getName(), 'Not enough players online for this HEAVY ASSET! Bail out or you will be killed.' ], None)
  14. warns += 1
  15.  
  16. #Add timer here
  17. warnTimer = timer(warnPly(), 4, 1)
  18. except: pass
  19. if warnUserAsset:
  20. warnPly()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement