Kaco123 Posted June 21, 2015 Share Posted June 21, 2015 Hello,So I want to set hp for eng,cvops,field,soldier and medics.When new player join on the server he has 100 HP but when he get 3 or 4 medics lvl his HP is 115. I want to set 140 HP from begining to the end http://forums.warchest.com/images/smilies/biggrin.gif I have some script like this but it's not working properly. function et_InitGame(levelTime, randomSeed, restart) et.RegisterModName("NQ health")endfunction et_ClientSpawn(clientNum, revived) et.gentity_set(clientNum, "health", 140) end After one death HP is 100 or 115 it depends from med lvl. When you are playing eng, or field it doesnt matter just not a med health points decline from 140 to 100 or 115. Can you help me guys with that? Quote Link to comment Share on other sites More sharing options...
Zelly Posted June 21, 2015 Share Posted June 21, 2015 (edited) Are you using this for NQ or silent. (Sorry if obvious question seeing how you have "NQ health", just not sure if you are using that as reference or you are actually on NQ) Cause there are two ways to do this and its easier in silent mod. EDIT#2: If you are on silent I am pretty sure all you need to do is: local MAX_HEALTH = 140 -- Change your max health here. function et_ClientSpawn( clientNum, revived, teamChange, restoreHealth ) et.gentity_set( clientNum , "ps.stats" , 4 , MAX_HEALTH ) endThis will make all classes start with 140. But it isn't this easy on older mods. EDIT#3: Actually this code MIGHT work for other mods. Maybe it was just legacy mod that it crashed my server.^^ Edited June 21, 2015 by Zelly Kaco123 1 Quote Link to comment Share on other sites More sharing options...
Kaco123 Posted June 21, 2015 Author Share Posted June 21, 2015 I have nq, so it will work on my server? Quote Link to comment Share on other sites More sharing options...
Zelly Posted June 21, 2015 Share Posted June 21, 2015 I am not sure, you can try. Otherwise you might have to do it the more complex way. Just test it while no one is on. Quote Link to comment Share on other sites More sharing options...
Purple Posted June 21, 2015 Share Posted June 21, 2015 Are you using this for NQ or silent. (Sorry if obvious question seeing how you have "NQ health", just not sure if you are using that as reference or you are actually on NQ) Cause there are two ways to do this and its easier in silent mod. EDIT#2: If you are on silent I am pretty sure all you need to do is: local MAX_HEALTH = 140 -- Change your max health here. function et_ClientSpawn( clientNum, revived, teamChange, restoreHealth ) et.gentity_set( clientNum , "ps.stats" , 4 , MAX_HEALTH ) endThis will make all classes start with 140. But it isn't this easy on older mods. EDIT#3: Actually this code MIGHT work for other mods. Maybe it was just legacy mod that it crashed my server.^^ where the hell did i get health from? wtf. Quote Link to comment Share on other sites More sharing options...
Kaco123 Posted June 21, 2015 Author Share Posted June 21, 2015 it's working. Thank you very much Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.