-- [ Picked text/plain from multipart/alternative ] Here's some pseudo code that should do what you require
QAngle angPlayerAngle = GetLocalAngles(); Vector forward; AngleVectors( angPlayerAngle, &forward ); float flPushForce = -500; // <--- some arbitrary number.. It's negative because I want to push him in the opposite direction of forward SetLocalVelocity( GetLocalVelocity() + ( forward * flPushForce ) ); The above code needs to be done in the player class SDKPlayer ----- Original Message ----- From: "Chad Lehman" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Sunday, December 09, 2007 12:41 PM Subject: RE: [hlcoders] Pushing a player backward > -- > [ Picked text/plain from multipart/alternative ] > > Hi, > > We actually figured out how to change directories by using the __FILE__ > macro, and some of the features of std::string, which can find the last of > a character (the backslash). > > -------------------- > What we'd like to do now is punish a bad answer from the player by > throwing him backward, in the opposite direction he is facing; sort of > like adding a direction/velocity vector. > > If you can help with that, it would help us tremendously. > > I'm sorry about the scattershot questions... I promise this will be the > last one (for today :)) > > > Chad > ---------------- > >> From: [EMAIL PROTECTED] >> To: [email protected] >> Subject: [hlcoders] Changing filepaths >> Date: Sun, 9 Dec 2007 11:39:09 -0700 >> >> -- >> [ Picked text/plain from multipart/alternative ] >> >> Greetz again, >> >> >> Thank you for the great help on the client->server messaging (using >> ClientCmd()). That worked well! >> >> Just one more question: >> >> We're trying to open a simple .txt file to populate a vgui panel (well, a >> multi-line label)... and the program is trying to open the file in: >> >> \Steam\steamapps\(accountname)\source sdk base >> >> The file should exist on the client only, which means we don't want to >> have to specially insert it into the Steam directory. >> >> I'm sure chdir() (from the C library) could get the job done, but we >> don't want to hardcode the pathname. Is there another way to get this >> directory from inside the code? >> >> (root)\(modname)\bin >> >> or >> >> (root)\(modname)\src\cl_dll >> >> ? >> >> Thank you! >> >> >> Chad >> >> >> _________________________________________________________________ >> Your smile counts. The more smiles you share, the more we donate. Join >> in. >> www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline >> -- >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> > > _________________________________________________________________ > Share life as it happens with the new Windows Live.Download today it's > FREE! > http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007 > -- > > _______________________________________________ > 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

