Raised This Month: $51 Target: $400
 12% 

Some errors


Post New Thread Reply   
 
Thread Tools Display Modes
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 15:48   Re: Some errors
Reply With Quote #11

well i use this?

it look like the same

Code:
edict_t* getEntityFromUserID(int userid) 
{ 
        for (int i = 1; i <= gpGlobals->maxClients; ++i) 
        { 
                edict_t *Pentity = engine->PEntityOfEntIndex(i); 
                if ( !Pentity || Pentity->IsFree() ) continue; 
                if (Pentity && engine->GetPlayerUserId(Pentity) == userid) 
                        return Pentity; 
        } 
        return NULL; 
}
DHJ is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 15:50   Re: Some errors
Reply With Quote #12

you haven't explain how i can this my erroes yet
DHJ is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 02-06-2009 , 15:56   Re: Some errors
Reply With Quote #13

You could do something like this:
Code:
edict_t * pEntity = getEntityFromUserID ( userid );
if ( pEntity ) {
    CBaseEntity *pBase = pEntity->GetUnknown()->GetBaseEntity();
    pBase->SetModel("models/player/skitz/ct_rank_private_v1/urban.mdl");
}

Last edited by Keeper; 02-06-2009 at 15:59.
Keeper is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 16:11   Re: Some errors
Reply With Quote #14

tried that myself, just gave me a new error, i can't fix

Code:
1>.\serverplugin_empty.cpp(342) : error C2027: use of undefined type 'CBaseEntity'
1>        c:\skinbyscore\src\public\gametrace.h(22) : see declaration of 'CBaseEntity'
1>.\serverplugin_empty.cpp(342) : error C2227: left of '->SetModel' must point to class/struct/union/generic type
DHJ is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 02-06-2009 , 16:17   Re: Some errors
Reply With Quote #15

After:

Code:
#include <string>
add

Code:
#define GAME_DLL 1 
#include "cbase.h"
#include "baseentity.h"
Keeper is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 16:22   Re: Some errors
Reply With Quote #16

gave me a lot of weird errors

Code:
1>.\serverplugin_empty.cpp(36) : error C2371: 'gameeventmanager' : redefinition; different basic types
1>        c:\skinbyscore\src\dlls\enginecallback.h(43) : see declaration of 'gameeventmanager'
1>.\serverplugin_empty.cpp(52) : error C2084: function 'bool FStrEq(const char *,const char *)' already has a body
1>        c:\skinbyscore\src\dlls\util.h(173) : see previous definition of 'FStrEq'
1>.\serverplugin_empty.cpp(130) : error C2440: '=' : cannot convert from 'IGameEventManager *' to 'IGameEventManager2 *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\serverplugin_empty.cpp(155) : error C2664: 'IGameEventManager2::RemoveListener' : cannot convert parameter 1 from 'CEmptyServerPlugin *const ' to 'IGameEventListener2 *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\serverplugin_empty.cpp(186) : error C2660: 'IGameEventManager2::AddListener' : function does not take 2 arguments
1>.\serverplugin_empty.cpp(214) : error C2664: 'IGameEventManager2::RemoveListener' : cannot convert parameter 1 from 'CEmptyServerPlugin *const ' to 'IGameEventListener2 *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
DHJ is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 02-06-2009 , 16:41   Re: Some errors
Reply With Quote #17

You may want to try to delete the #include "cbase.h" see if that works for you.
Keeper is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 16:42   Re: Some errors
Reply With Quote #18

nope gave me 94 errors
DHJ is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 02-06-2009 , 16:44   Re: Some errors
Reply With Quote #19

What are the errors now? The same as before?
Keeper is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 16:47   Re: Some errors
Reply With Quote #20

Nope gave me a lot of errors from entitylist.h and entityoutput.h and baseentity.h
DHJ is offline
Reply



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 02:11.


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