[Release] Show Player Health Zombies
-
First you need to add healthPlayer() under onplayerconnect()
onplayerconnect() { for(;;) { level waittill( "connecting", player ); player.clientid = level.clientid; player thread onplayerspawned(); level.clientid++; player thread healthPlayer(); } }
Next add this anywhere in your script
healthPlayer() { self endon("disconnect"); self.healthText = createFontString("Objective" , 1.7); //Fixed self.healthText setPoint("CENTER", "TOP", 300, "CENTER"); while(true) { self.healthText setText( "^2HEALTH: ^7"+ self.health); wait 0.5; } }
Enjoy!
If you have any questions dm me on Discord: Ashton Biehl#6969
-
I was adding this to zombies++, i have everything in order and the gsc works fine, but no health is displayed and I was wondering if there are any other steps i need to take to make this show up in game
-
Boomer2526 The same thing happens to me, did someone find the solution? (I also use Zombies ++)
-
Fedello This is to deploy on a zombie server, I personally have not tested on the client.
-
Kalitos I have tried it on my own server, but there is no way ...
-
Fedello Paste here all the code of your script without compiling.
-
I finally got it to work XD
healthPlayer() { self endon("disconnect"); if ( isDefined ( self.healthText ) ) return; self iPrintln("Estas entrando en TOXICITY GALLEGO"); self iprintln( "Sin limite de Perks, empiezas con 2500, Precio Caja: 500, Contador Zombis, HUD de Vida: "+ self.health); self.healthText = createServerFontString("Objective" , 1.7); self.healthText setPoint("CENTER", "BOTTOM", 0, "CENTER"); while(true) { self.healthText setText( "^2VIDA: ^7"+ self.health); wait 0.5; } }
-
Fedello Do not use "createServerFontString", SINCE THIS WILL MAKE EACH PLAYER SEE EVERYONE'S LIFE OVER THE SAME, instead you should use "createFontString" which is for each client.
-
Kalitos Exactly, yesterday I tried it with a friend and this happened to me. I'll try like you told me. Thank you very much: D
-
Ashton Biehl Hello, i want help
Where do I put this script? -
77z plutonium\storage\t6\scripts\zm
-
hindercanrun I mean create a .gsc file and put words in it?
-
77z make a txt then rename it to gsc then edit it
-
Ashton Biehl donde encuentro eso?
-
no se si podrian explicarme paso a paso porfa no le entiendo