![]() |
Player Joining..
Ok, i have spent literally HOURS looking for the code that is executed as soon as a player joins the game, does anyone else know where this is?
This is my first time playing with the SDK, and although a lot of it makes sence, a lot of the files seem rather irrelevant.. if creating a mod from scratch i dont WANT the MP5, Shotgun and Frag Nades from CS:S built into it.. its just frustrating that there is a lot of code for things that will probably never be used ;P |
Re: Player Joining..
I haven't had a chance to poke around much, but it might help to look at the serverplugin_sample code in the src\utils directory.
There's some example code in there giving function names when players connect to the server, disconnect from the server, get authorized by Steam, change their player name, etc. I assume those function names will be the same as in the multiplayer code. botman |
Re: Player Joining..
I'd do a clientconnect or clientputinserver search. I already saw that most function names remain the same compared to the 'old' sdk. I think that is on purpose to make the 'shift' as painless as possible.
i already found pieces in player.cpp with FAKECLIENT, even a "IsBot()" function. I think thats pretty neat! They already think ahead on this one. I found several files with these key words btw, search for it ;) |
Re: Player Joining..
P.s. Just to get you started, pfnRunPlayerMove() became PlayerRunCommand().
(just in case you're searching for it). botman |
Re: Player Joining..
haha! somehow I knew botman was already playing around quietly in his corner with the SDK. pwned, botman! :P
/me transports his bed outdoors near the mailbox waiting for Stefan's CDROMs... |
Re: Player Joining..
lol, it may take a while PM for those cd's but it will be before 2005 you have them ;) I have to send them monday i think... (i hope!)....
PlayerRunCommand... ah, cool! :D |
Re: Player Joining..
i did a look for PlayerRunCommand,; it seems it is used for vehicles...
apart from that i cannot see the use of this command yet, nor for bots. But, that also is becuase i have no real clue yet about the code. |
Re: Player Joining..
Look for a pmove.cpp or a pm_move.cpp or something. You could also try looking at the player class or in client.cpp.
|
Re: Player Joining..
Wait ignore that. I that you were talking about a player movement command.
I am going to look in the player class's constructor. |
Re: Player Joining..
I found a function that looks like it would work.
Declaration (game_shared/multiplay_gamerules.h): Code:
virtual bool ClientConnected( edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen ); Code:
bool CMultiplayRules::ClientConnected( edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen ) |
All times are GMT +2. The time now is 03:33. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.