Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Little c++ coding help needed please
Little c++ coding help needed please [message #417187] Sun, 10 January 2010 13:12 Go to next message
Raptor RSF is currently offline  Raptor RSF
Messages: 210
Registered: July 2007
Location: Netherlands
Karma: 0
Recruit
Why is Get_Points not giving me the points? Do i do something wrong? (Its for a custom HUD...)


	// Gets the points from	the player or vehicle
	GameObject *obj = Get_Vehicle_Return((GameObject *)(*TheStar)->obj);
	float current_points = 0;
	if (Get_Vehicle(obj))
	{
		current_points = Commands->Get_Points(Get_Vehicle(obj));
	}
	else
	{
		current_points = Commands->Get_Points(obj);
	}



Rencom server Fan - Marathon#1

http://bfbc2.statsverse.com/sig/clean1/pc/Raptor_RSF.png
Re: Little c++ coding help needed please [message #417191 is a reply to message #417187] Sun, 10 January 2010 13:38 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
What is this supposed to do? A vehicle does not have a score so Get_Points will naturally fail on a vehicle game object.
Re: Little c++ coding help needed please [message #417192 is a reply to message #417191] Sun, 10 January 2010 13:40 Go to previous messageGo to next message
Raptor RSF is currently offline  Raptor RSF
Messages: 210
Registered: July 2007
Location: Netherlands
Karma: 0
Recruit
I just want the score of the player. (Its al client side)

Rencom server Fan - Marathon#1

http://bfbc2.statsverse.com/sig/clean1/pc/Raptor_RSF.png
Re: Little c++ coding help needed please [message #417198 is a reply to message #417192] Sun, 10 January 2010 14:22 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
Raptor RSF wrote on Sun, 10 January 2010 20:40

I just want the score of the player. (Its al client side)


So just give it a player game object and it will give you the score.
Re: Little c++ coding help needed please [message #417201 is a reply to message #417187] Sun, 10 January 2010 14:40 Go to previous message
Raptor RSF is currently offline  Raptor RSF
Messages: 210
Registered: July 2007
Location: Netherlands
Karma: 0
Recruit
Tunaman helped me with this and it works now Satisfied

I changed to and int instead and that was doing the trick.

Thanks for your help anyway!


Rencom server Fan - Marathon#1

http://bfbc2.statsverse.com/sig/clean1/pc/Raptor_RSF.png

[Updated on: Sun, 10 January 2010 14:42]

Report message to a moderator

Previous Topic: [Request]Scripts
Next Topic: SCUD Storm is public BETA
Goto Forum:
  


Current Time: Sun Dec 15 17:52:51 MST 2024

Total time taken to generate the page: 0.00789 seconds