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

GetGameDescription return differs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zynda
Member
Join Date: Jul 2011
Old 06-05-2016 , 07:23   GetGameDescription return differs
Reply With Quote #1

PHP Code:
// Running Sven Co-op 48/5.0.0.0 7063
public plugin_init()
{
    new 
gameName32 ]
    
dllfuncDLLFunc_GetGameDescriptiongameName )
    
    
server_print"^"%s^""gameName )

During first server launch this will return "Sven C" but after a map change or server restart it will simply return "Sven".
Anyone got a clue what is behind this?

Or better yet is there a way to get the full name like metamod does when executing meta game

Code:
GameDLL info:
        name: svencoop
        desc: server.dll (autodetect-override)
     gamedir: B:\Servers\Svencoop_Win/svencoop
    dll file: server.dll
dll pathname: B:\Servers\Svencoop_Win/svencoop/dlls/server.dll

Last edited by Zynda; 06-05-2016 at 07:24.
Zynda is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-05-2016 , 08:24   Re: GetGameDescription return differs
Reply With Quote #2

Try with this instead: dllfunc(DLLFunc_GetGameDescription, gameName, charsmax(gameName))

But I'm not sure what you're trying to do.
__________________
Arkshine is offline
Zynda
Member
Join Date: Jul 2011
Old 06-05-2016 , 11:18   Re: GetGameDescription return differs
Reply With Quote #3

I never said what i ultimately was trying to do, as it is not really important to the question.
My task is to get which hlmod is running and make decisions based on that.

Specifying the string length did the trick however, so that was that mystery.

I would still like to have the string that metamod gets though, which would be just "svencoop" or "cstrike".

Last edited by Zynda; 06-05-2016 at 11:25.
Zynda is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-05-2016 , 11:25   Re: GetGameDescription return differs
Reply With Quote #4

Then try get_modname().
__________________

Last edited by Arkshine; 06-05-2016 at 11:26.
Arkshine is offline
Zynda
Member
Join Date: Jul 2011
Old 06-05-2016 , 17:05   Re: GetGameDescription return differs
Reply With Quote #5

Much obliged; just what i need.
Zynda 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 10:21.


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