Jump to content

HP


Kaco123

Recommended Posts

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")
end

function 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?

Link to comment
Share on other sites

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 )
end
This 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 by Zelly
Link to comment
Share on other sites

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 )
end
This 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...