Willkommen ~Gast!
Registrieren || Einloggen || Hilfe/FAQ || Staff
Probleme mit der Registrierung im Forum? Melde dich unter registerEin Bild.
Autor Beitrag
000
26.08.2002, 20:57
Ratman2000



Hallo !
Ich versuche im moment die Wonid eines Spielers gleich beim connecten zu bekommen....

Wenn ich es über GETPLAYERWONID(pEntity) versuche, dan bekomm ich nur ne riesen - zahl...

Wenn ich es so versuche das ich in meiner plugin.h die in der engine_api.cpp included ist folgendes schreibe :
#define GETPLAYERAUTHID (*g_engfuncs.pfnGetPlayerAuthId)
dan kommt immer dieser fehler :
error C2039: 'pfnGetPlayerAuthId' : Ist kein Element von 'enginefuncs_s'
könnt ihr mir sagen was ich falsch mache oder wie ich sonst die Wonid beim connecten bekomme ?

DANKE !

--

zum Seitenanfang zum Seitenende Profil || Suche
001
26.08.2002, 23:32
theDon



was meinst du eigentlich, warum adminmod opensource ist?!

--

\o tanz den naziprau! o/

And more than ever, I hope to never fall,
Where enough is not the same it was before

zum Seitenanfang zum Seitenende Profil || Suche
002
26.08.2002, 23:53
Ratman2000



Schon aber AM zeigt auch net beim Connecten die IP An...

Wenn ich Connectet bin iss es kein Prob !

Das Prob iss beim Connecten !

--

zum Seitenanfang zum Seitenende Profil || Suche
003
27.08.2002, 08:20
Bluthund



Kuck dir ma das Servergreetings Plugin von Ascad an. Da zeigt er IP, WONID etc. an. Hier

--

The C language combines all the power of assembly language with all the ease-of-use of assembly language.
"humorig is n blödwort :>" by -CarniGGeLjumpR-

zum Seitenanfang zum Seitenende Profil || Suche
004
27.08.2002, 08:24
Ratman2000



Hmmm das ding iss zwar nen AM Plugin... aber ich such ma im AM Code :)
Wenns nicht klappt meld ich mich nochmal :) Danke soweit !

--

zum Seitenanfang zum Seitenende Profil || Suche
005
27.08.2002, 08:28
Ratman2000



So...
Ich hab zwar 1 Jahr Small programmiert, kann die Wonid da in dem Plugin aber nicht finden...
Ich meinte oben:
Das ich die IP und den Nick habe...
Vieleicht sollte ich noch sagen das es kein AM Plugin ist sondern ein eigenes MM Plugin (dll)
Kann mir da jemand helfen die Wonid zu bekommen ?

--

zum Seitenanfang zum Seitenende Profil || Suche
006
27.08.2002, 08:59
Bluthund



Quellcode:public GetTeamCount(iTeam)
{
new i;
new maxplayers = maxplayercount();
new SessionID;
new Team;
new TeamCount = 0;
new WONID;
new Name[MAX_NAME_LENGTH];

for(i = 1; i <= maxplayers; i++)
{
  if(playerinfo(i,Name,MAX_NAME_LENGTH,SessionID,WONID,Team)==1)
  {
   if(Team==iTeam)
   {
    TeamCount++;
   }
  }
}
return TeamCount;
}

Brauchst also nur die WONID übergeben. Wir wissen das es kein AM Plugin iss aber wie wäre es mit: playerinfo() in den AM Sources suchen und den Code für die WonID rausnehmen.

--

The C language combines all the power of assembly language with all the ease-of-use of assembly language.
"humorig is n blödwort :>" by -CarniGGeLjumpR-

zum Seitenanfang zum Seitenende Profil || Suche
007
27.08.2002, 09:05
Ratman2000



Ahja... Suppi Tipp ! Ich schau malwas ich machen kan THX !!!!

--

zum Seitenanfang zum Seitenende Profil || Suche
008
27.08.2002, 09:14
Ratman2000



Nix iss....
Hab mir gerade den Source von AM angesehen...
Dabei ist mir in den Kopf gekommen, dass ich das Früher auch mal als AM Plugin versucht habe...
Aber beim Connecten bekommt man nur ne 0 bei AM...
Die selbe Routine wie AM hab ich im mom auch gestrickt... aber da bekomm ich net die WONID....

Ne andere idee ?

Was ich weiss was gehen soll ist dies: GETPLAYERAUTHID

Da soll dan die Wonn oder ne Stream id kommen...

Das Problem bei mir ist, dass wenn ich es aufrufe :

ID = GETPLAYERAUTHID(pszName);

Heist es : error C2065: 'GETPLAYERAUTHID' : undeclared identifier

wenn ich dan in meine plugin.h dies schreibe:

#define GETPLAYERAUTHID (*g_engfuncs.pfnGetPlayerAuthId)

heist es:

error C2039: 'pfnGetPlayerAuthId' : is not a member of 'enginefuncs_s'

wenn ich aber in die engine_notes.html von Metamod schaue, seh ich dort ganz unten als letztes:

GetPlayerAuthId
from engine/eiface.h:

const char *GetPlayerAuthId(edict_t *e);
From Eric Smith <EricS@valvesoftware.com> on hlcoders:

The AuthID is a way for applications/mods to get the Authentication ID (uniqueID) for a player. The AuthID can be a WonID or a SteamID. The function I've written returns the AuthID as a string. Calling GetPlayerWONId will still work for Non-Steam players just like it always has. If applications/mods want to get a jump start on getting ready to support Steam players, then they can start using GetPlayerAuthId, which will still work for Non-Steam players, but it will give the WonID as a string instead of an unsigned int.
From Eric Smith <EricS@valvesoftware.com> on servertest:

Only clients playing via Steam will have SteamIDs. Clients who are not using Steam will still have WonIDs (just like they always have). The server now supports WonIDs\SteamIDs and banning using either of them. WonIDs have not changed. SteamIDs use the format: STEAM_<#>:<#> where <#> is replaced by numbers. An example SteamID would be "STEAM_0:94534".
From Eric Smith <EricS@valvesoftware.com> on hlcoders:

This function will now return the string "BOT" as the AuthID for fake clients.
comments:

Added for HL 1109; no SDK update.

Was mach ich da falsch ???

--

zum Seitenanfang zum Seitenende Profil || Suche
009
27.08.2002, 09:41
Bluthund



Wieso durchsuchst du nich einfach das SDK nach WonID und findest dabei
#define GETPLAYERWONID (*g_engfuncs.pfnGetPlayerWONId)
in der enginecallback.h?!
Der Code ist doch ausreichend kommentiert und es iss ja weiss Gott nich zu schwer sich ma ein bisschen durch die Suchergebnisse zu klicken (mich hat das ganze nichma 2 minuten gekostet). Zeig doch auch ma n bissel Eigeninitiative und komm nich wegen jeden kleinen prob hierher

--

The C language combines all the power of assembly language with all the ease-of-use of assembly language.
"humorig is n blödwort :>" by -CarniGGeLjumpR-

zum Seitenanfang zum Seitenende Profil || Suche
010
27.08.2002, 09:45
Ratman2000



Jo iss ja schön und gut die Routine....

BOOL ClientConnect(edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[128])
{
char sCommand[100];
int Wonid, iID;
hudtextparms_t m_textParms;
int ID;

sprintf(sCommand,"%s", pszName);

int iPlayerIndex = GetPlayerIndex(sCommand);

if (iPlayerIndex != 0)
{
CBaseEntity *pPlayer = UTIL_PlayerByIndex(iPlayerIndex);

Wonid = GETPLAYERWONID(pPlayer->edict());

iID = GETPLAYERUSERID(pPlayer->edict());
}
}

Wenn man ne riesen minus zahl ne Wonid nennen kann is es ok... aber es ist so, dass er die Wonid erst richtig bringt, wenn ich in die Console (beim client) retry eingebe... also reconnecte... danach funzt es aber so nicht... das hab ich ja auch versucht so dumm bin ich net :)

--

zum Seitenanfang zum Seitenende Profil || Suche
011
27.08.2002, 23:50
theDon



du kannst das ganze natürlich nicht auf einem lan server testen, weil lan server nihct über won laufen und du deshalb auch keine wonid hast

--

\o tanz den naziprau! o/

And more than ever, I hope to never fall,
Where enough is not the same it was before

zum Seitenanfang zum Seitenende Profil || Suche
012
28.08.2002, 08:16
Ratman2000



LOL Ich hab es aber auf nem Online Server getestet ! SO schlau bin bich auch....

--

zum Seitenanfang zum Seitenende Profil || Suche
013
28.08.2002, 10:19
theDon



hmpf...GETPLAYERAUTHID gibt einen UNSIGNED INT zurück. keinen int. deshalb die minus-zahl

--

\o tanz den naziprau! o/

And more than ever, I hope to never fall,
Where enough is not the same it was before

zum Seitenanfang zum Seitenende Profil || Suche
014
28.08.2002, 10:26
Ratman2000



dan verstehe ich nicht, warum dies kommt:

Ich komme ganz neu rein : Minus Zahl...

Ich reconnecte (retry): Richtige Wonid...

Wieso kommt dan das ?

--

zum Seitenanfang zum Seitenende Profil || Suche
015
29.08.2002, 12:39
theDon



versuchs doch mal mit unsigned int

--

\o tanz den naziprau! o/

And more than ever, I hope to never fall,
Where enough is not the same it was before

zum Seitenanfang zum Seitenende Profil || Suche