FPtje / DarkRP

DarkRP, a non-serious roleplay gamemode for Garry's Mod.
https://darkrp.miraheze.org
MIT License
463 stars 710 forks source link

Respawn time doesnt working #2624

Closed takaqiao closed 7 years ago

takaqiao commented 7 years ago

Description of the bug

//: # Respawn time doesnt working I set GM.Config.respawntime = 300 Bcuz i have a medic with defibrillator and i want players wont think dead is better than arrested and there will be more costs if they dead

How to make the bug happen

//: # GM.Config.respawntime = 300 not working

Lua errors

//: # No lua errors

Why the developer of DarkRP is responsible for this issue

//: # I think its a kind of bug

FPtje commented 7 years ago

I limited it because server owners started to think longer respawn times were better. That players are supposed to do something else for five full god damn minutes every single god damn time they die.

takaqiao commented 7 years ago

Um... ok..

takaqiao commented 7 years ago

Thanks for ur helping

Shigbeard commented 7 years ago

How about instead of relying on a config option, code something that happens on death to allow people to either wait for revive, or respawn immediately at the cost of their weapons and a "ambulance fee" ie subtract $XYZ from their wallet if they choose to respawn immediately.

To make it extra effective against people who die to evade arrest etc, make it a percentage of their wallet, say 10%. The poor would barely notice it and the rich would get hit like a ton of bricks.

Nobody here would code it for you, but a great starting point would be http://wiki.garrysmod.com/page/GM/PlayerDeath for the hook to listen to, http://wiki.garrysmod.com/page/Derma_Basic_Guide for a gui, and http://wiki.darkrp.com/index.php/Functions/Player/Server/addMoney to modify the wallet. Furthermore, you may wish to lookup http://wiki.garrysmod.com/page/Net_Library_Usage for tips and tricks to relay information to the client when they die to draw your derma and to inform the server when the player wishes to instantly respawn, and from there you should be able to figure out all the other details. If you are confused or lost, you can always search either wiki for a function that sounds like it would help you.

On 28/01/2017 7:00 PM, takaqiao wrote:

Thanks for ur helping

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FPtje/DarkRP/issues/2624#issuecomment-275834117, or mute the thread https://github.com/notifications/unsubscribe-auth/AEEJtyvjK07VpoAcsY-hb-XOcCQAD5ebks5rWvWygaJpZM4LwcqI.

-- Regards, /Nathan Davies-Lee/

takaqiao commented 7 years ago

Wow Just solve my problem Thanks for ur helping! @Shigbeard Appreciate!!!!!!