Re: [hlcoders] Player command - Health control? Damage?
off-topic N suggestions: * Avoid daylight, code at night * Buy a C++ book. (-- this its very valuable tip, but I think will be ignored because you will think its something rude ) * Teamup with other guy. (-- blame he your bugs. You can have fun with bugs + asserts + friends ) * Start a software pet project (-- swich to the pet wen stuck. ) * Use tabs, not spaces. Frank Weima wrote: *sigh* People, I'm a newbie to C++. I am just teaching it for some months now. Like the other guy was saying: static_castCBasePlayer* the CBaseEntity, then do Event_Killed(CTakeDamageInfo( blah )); to kill him, then Event_Dying() ==and== just use SetHealth and GetHealth - but make sure to check if it goes to 0 or below, as you'll have to kill him yourself if it happens. Yes, maybe for the real coders this is easy. I tried to figure it out myself now for weeks, but still cannot do it. Is there someone who can realy help me with a piece of code or something? My code is like this now: Q_snprintf( gBuffer, 128, Setting your health); // Message engine-ClientPrintf(pEntity, gBuffer ); // It has to come here, the health that goes up CreateAMessage(pEntity,msg,gBuffer,engine-IndexOfEdict(pEntity)); engine-ClientCommand(pEntity,gBuffer);// Message again So please, anobody? Thanks. Frank Weima. - Original Message - From: Lance Vorgin [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Thursday, January 20, 2005 12:21 AM Subject: Re: [hlcoders] Player command - Health control? Damage? You need to include a ton of server project headers. Just #define GAME_DLL 1 at the top and take all the #includes from util.cpp :/ Update killed the Event_ stuff for the time being (how mean of them). CBaseEntity::Teleport still works. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
Funny. What about clientCommands *cheat* without the sv_cheats 1. - Original Message - From: Ben Davison [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Thursday, January 20, 2005 3:50 PM Subject: Re: [hlcoders] Player command - Health control? Damage? * Teamup with other guy. (-- blame he your bugs. You can have fun with bugs + asserts + friends ) How I love my coding freind :) On Thu, 20 Jan 2005 15:47:26 +0100, tei [EMAIL PROTECTED] wrote: off-topic N suggestions: * Avoid daylight, code at night * Buy a C++ book. (-- this its very valuable tip, but I think will be ignored because you will think its something rude ) * Teamup with other guy. (-- blame he your bugs. You can have fun with bugs + asserts + friends ) * Start a software pet project (-- swich to the pet wen stuck. ) * Use tabs, not spaces. Frank Weima wrote: *sigh* People, I'm a newbie to C++. I am just teaching it for some months now. Like the other guy was saying: static_castCBasePlayer* the CBaseEntity, then do Event_Killed(CTakeDamageInfo( blah )); to kill him, then Event_Dying() ==and== just use SetHealth and GetHealth - but make sure to check if it goes to 0 or below, as you'll have to kill him yourself if it happens. Yes, maybe for the real coders this is easy. I tried to figure it out myself now for weeks, but still cannot do it. Is there someone who can realy help me with a piece of code or something? My code is like this now: Q_snprintf( gBuffer, 128, Setting your health); // Message engine-ClientPrintf(pEntity, gBuffer ); // It has to come here, the health that goes up CreateAMessage(pEntity,msg,gBuffer,engine-IndexOfEdict(pEntity)); engine-ClientCommand(pEntity,gBuffer);// Message again So please, anobody? Thanks. Frank Weima. - Original Message - From: Lance Vorgin [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Thursday, January 20, 2005 12:21 AM Subject: Re: [hlcoders] Player command - Health control? Damage? You need to include a ton of server project headers. Just #define GAME_DLL 1 at the top and take all the #includes from util.cpp :/ Update killed the Event_ stuff for the time being (how mean of them). CBaseEntity::Teleport still works. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- - Ben Davison - http://www.shadow-phoenix.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
I really doubt that alot of those are forwarded to the server, as many deal with the material and rendering subsystems and the sv_cheats check is made locally :rolleyes: ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
Hi again, I still not figured it out. I tried serveral things but still no actions. Everyone knows that the slay command: 'engine-ClientCommand(pEntity, kill\n); ' is. But what about SLAP. GetHealth? Sethealth? Doesn't reqonize. Also for teleport, Im not that good in C++, so any help would be great. Like a piece of code, website. Things like that. Thanks Frank. - Original Message - From: Lance Vorgin [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Monday, January 10, 2005 5:59 AM Subject: Re: [hlcoders] Player command - Health control? Damage? Well, my friend qizmo and I have gotten slap working well. My contribution was the actual slapping: get a CBaseEntity of the player you want to slap and use the Teleport function to change his velocity to some random vector. As for dealing damage, this is compliments of theqizmo: static_castCBasePlayer* the CBaseEntity, then do Event_Killed(CTakeDamageInfo( blah )); to kill him, then Event_Dying() to make him run through the motions of actually dying. To modify his health just use SetHealth and GetHealth - but make sure to check if it goes to 0 or below, as you'll have to kill him yourself if it happens. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
You need to include a ton of server project headers. Just #define GAME_DLL 1 at the top and take all the #includes from util.cpp :/ Update killed the Event_ stuff for the time being (how mean of them). CBaseEntity::Teleport still works. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
*sigh* People, I'm a newbie to C++. I am just teaching it for some months now. Like the other guy was saying: static_castCBasePlayer* the CBaseEntity, then do Event_Killed(CTakeDamageInfo( blah )); to kill him, then Event_Dying() ==and== just use SetHealth and GetHealth - but make sure to check if it goes to 0 or below, as you'll have to kill him yourself if it happens. Yes, maybe for the real coders this is easy. I tried to figure it out myself now for weeks, but still cannot do it. Is there someone who can realy help me with a piece of code or something? My code is like this now: Q_snprintf( gBuffer, 128, Setting your health); // Message engine-ClientPrintf(pEntity, gBuffer ); // It has to come here, the health that goes up CreateAMessage(pEntity,msg,gBuffer,engine-IndexOfEdict(pEntity)); engine-ClientCommand(pEntity,gBuffer);// Message again So please, anobody? Thanks. Frank Weima. - Original Message - From: Lance Vorgin [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Thursday, January 20, 2005 12:21 AM Subject: Re: [hlcoders] Player command - Health control? Damage? You need to include a ton of server project headers. Just #define GAME_DLL 1 at the top and take all the #includes from util.cpp :/ Update killed the Event_ stuff for the time being (how mean of them). CBaseEntity::Teleport still works. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
- Original Message - From: Jeffrey botman Broome [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Sunday, January 09, 2005 1:53 AM Subject: Re: [hlcoders] Player command - Health control? Damage? Frank Weima wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] While playing Counter-Strike 1.6 in a server with adminmod you've got the ADMIN_SLAP command. Also you had a command to give a player 200HP or change it to 1HP. Does anyone knows a code/command to this for CS-Source? I think this stuff does the admin_slap type feature... http://www.sourcemod.net/ -- Jeffrey botman Broome ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
Well, my friend qizmo and I have gotten slap working well. My contribution was the actual slapping: get a CBaseEntity of the player you want to slap and use the Teleport function to change his velocity to some random vector. As for dealing damage, this is compliments of theqizmo: static_castCBasePlayer* the CBaseEntity, then do Event_Killed(CTakeDamageInfo( blah )); to kill him, then Event_Dying() to make him run through the motions of actually dying. To modify his health just use SetHealth and GetHealth - but make sure to check if it goes to 0 or below, as you'll have to kill him yourself if it happens. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Player command - Health control? Damage?
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] Hello Coders, Is there a command to control a players'health? *client command* Giving someones health. Removing someones health. While playing Counter-Strike 1.6 in a server with adminmod you've got the ADMIN_SLAP command. Also you had a command to give a player 200HP or change it to 1HP. Does anyone knows a code/command to this for CS-Source? Thanks! Frank Weima *... English again;) * -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player command - Health control? Damage?
Frank Weima wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] While playing Counter-Strike 1.6 in a server with adminmod you've got the ADMIN_SLAP command. Also you had a command to give a player 200HP or change it to 1HP. Does anyone knows a code/command to this for CS-Source? I think this stuff does the admin_slap type feature... http://www.sourcemod.net/ -- Jeffrey botman Broome ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders