Raised This Month: $32 Target: $400
 8% 

OnClientPutInServer not called


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
client21
Senior Member
Join Date: Apr 2013
Old 03-01-2017 , 10:20   OnClientPutInServer not called
Reply With Quote #1

PHP Code:
#define SMEXT_ENABLE_PLAYERHELPERS

class MyClass : public SDKExtension, public IClientListener
{
public:
    
virtual bool SDK_OnLoad(char *errorsize_t maxlengthbool late);
    
virtual void SDK_OnUnload();
public:
    
void OnClientPutInServer(int client);
};

void MyClass::OnClientPutInServer(int client)
{
    
rootconsole->ConsolePrint("-> zzzzz");

    
fstream f1;
    
f1.open("z.txt"ios::binary ios::out);
    
f1.put('v');
    
f1.close();

    
g_pSM->LogError(myself"zzzzzzzzzzzzzzzzzzzzzzzzz");

sm 1.6.3
Why dont work?

Last edited by client21; 03-01-2017 at 10:22.
client21 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-01-2017 , 10:30   Re: OnClientPutInServer not called
Reply With Quote #2

sm 1.6.3??
We're on sm 1.8/1.9 now..
edit: also i'm no c++ example however my copy-pasting skills are sub-par, I would look at this for reference maybe? https://github.com/alliedmodders/sou...tension.h#L244

Last edited by Mitchell; 03-01-2017 at 10:32.
Mitchell is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 03-01-2017 , 10:37   Re: OnClientPutInServer not called
Reply With Quote #3

What's in your SDK_OnLoad and SDK_OnUnload body? also I recommend enabling core interfaces using smsdk_config.h

edit:
https://github.com/alliedmodders/sou...Helpers.h#L479
https://github.com/alliedmodders/sou...Helpers.h#L486
__________________

Last edited by WildCard65; 03-01-2017 at 10:40.
WildCard65 is offline
client21
Senior Member
Join Date: Apr 2013
Old 03-01-2017 , 10:50   Re: OnClientPutInServer not called
Reply With Quote #4

Quote:
Originally Posted by WildCard65 View Post
What's in your SDK_OnLoad and SDK_OnUnload body? also I recommend enabling core interfaces using smsdk_config.h

edit:
https://github.com/alliedmodders/sou...Helpers.h#L479
https://github.com/alliedmodders/sou...Helpers.h#L486
Very good help, thx friend, its work.
client21 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode