player.vehicleHp only works in multiplayer?

Ask questions, discuss ideas, get answers

Re: player.vehicleHp only works in multiplayer?

Postby Diamondback » Sat Apr 06, 2019 5:12 am

Skull Kid, are you sure that player.Hp only works in MP like you said? I tried the command on a local server and it didn’t seem to work. Worked fine with the debugger though...

Can you post your code please?
See my Strasbourg map project here.
Diamondback
 
Posts: 496
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: player.vehicleHp only works in multiplayer?

Postby Skull Kid » Sat Apr 06, 2019 8:53 pm

Classical Modder wrote:Skull Kid, are you sure that player.Hp only works in MP like you said? I tried the command on a local server and it didn’t seem to work. Worked fine with the debugger though...

Can you post your code please?


Hi Classical Modder =)

Sure can! It's "player.vehicleHp" then of course the value of 30 which is max for infantry, and around 100 or more for tanks =)
Regards,

Skull Kid
User avatar
Skull Kid
 
Posts: 124
Joined: Fri Aug 03, 2012 8:44 pm
Location: Sweden

Re: player.vehicleHp only works in multiplayer?

Postby Diamondback » Sat Apr 06, 2019 11:53 pm

Do you have an example the code you used to make it work on a multiplayer server please?
See my Strasbourg map project here.
Diamondback
 
Posts: 496
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: player.vehicleHp only works in multiplayer?

Postby Skull Kid » Sun Apr 07, 2019 9:51 pm

Classical Modder wrote:Do you have an example the code you used to make it work on a multiplayer server please?

I forgot to mention you need to make youself "active" by using "player.active" and your name without any spaces whatsoever, then type "player.verhiclehp" followed by a number. All without the quotes, of course =)
Regards,

Skull Kid
User avatar
Skull Kid
 
Posts: 124
Joined: Fri Aug 03, 2012 8:44 pm
Location: Sweden

Re: player.vehicleHp only works in multiplayer?

Postby Diamondback » Sun Apr 07, 2019 11:21 pm

Skull Kid wrote:
Classical Modder wrote:Do you have an example the code you used to make it work on a multiplayer server please?

I forgot to mention you need to make youself "active" by using "player.active" and your name without any spaces whatsoever, then type "player.verhiclehp" followed by a number. All without the quotes, of course =)


When I did that in a local server the console said “Unrecognized object or method”, although it worked fine in the debugger. So I’m not sure that command can work in an Internet server.
See my Strasbourg map project here.
Diamondback
 
Posts: 496
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: player.vehicleHp only works in multiplayer?

Postby Skull Kid » Sun Apr 07, 2019 11:26 pm

Classical Modder wrote:
Skull Kid wrote:
Classical Modder wrote:Do you have an example the code you used to make it work on a multiplayer server please?

I forgot to mention you need to make youself "active" by using "player.active" and your name without any spaces whatsoever, then type "player.verhiclehp" followed by a number. All without the quotes, of course =)


When I did that in a local server the console said “Unrecognized object or method”, although it worked fine in the debugger. So I’m not sure that command can work in an Internet server.

Hmm… I'll have to check that out sometime soon… I'll report back!
Regards,

Skull Kid
User avatar
Skull Kid
 
Posts: 124
Joined: Fri Aug 03, 2012 8:44 pm
Location: Sweden

Re: player.vehicleHp only works in multiplayer?

Postby russ » Mon Apr 08, 2019 5:25 pm

You may have to patch the server to accept all console commands.
russ
 
Posts: 73
Joined: Sun Oct 29, 2017 8:12 am

Re: player.vehicleHp only works in multiplayer?

Postby Skull Kid » Mon Apr 08, 2019 7:38 pm

russ wrote:You may have to patch the server to accept all console commands.

I guess so, yes.
Regards,

Skull Kid
User avatar
Skull Kid
 
Posts: 124
Joined: Fri Aug 03, 2012 8:44 pm
Location: Sweden

Re: player.vehicleHp only works in multiplayer?

Postby Diamondback » Mon Apr 08, 2019 7:54 pm

I just remembered that you made a server patch that enables all the commands russ, I’ll download it and give the commands a try. Thanks, forgot about that one.
See my Strasbourg map project here.
Diamondback
 
Posts: 496
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Previous

Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Google [Bot] and 52 guests