Go Back   GTAGaming Forums > Grand Theft Auto Mods > Grand Theft Auto IV Mods
Register FAQ Members List Calendar Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 06-30-2009   #1
xddj
Registered User
Newbie Member
 
Join Date: Jun 2009
Posts: 4
xddj is an unknown quantity at this point
Get and print the current game host

Hi all,

I trying to make a script who find the current host in a game, and print it at screen. But nothing happens.

Here are the functions that I found and tried to cleanup: (i know that i can use" if (IsThisMachineTheServer())" to find the host, but i want to do it with these function, just for fun:
Code:
static const ch *NetworkGetHostServerName(u32 serverid) { return NativeInvoke::Invoke<const ch *>("NETWORK_GET_HOST_SERVER_NAME", serverid); }

static u32 GetServerId() { return NativeInvoke::Invoke<u32>("GET_SERVER_ID"); }

static u32 GetHostId() { return NativeInvoke::Invoke<u32>("GET_HOST_ID"); }
With GetServerId or GetHostId, it is the same, nothing happens in the games..

I write it like this:
Code:
PrintStringWithLiteralStringNow("STRING", NetworkGetHostServerName(GetServerId()), 1000, 1);
And no print at screen..
xddj is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 -6. The time now is 01:33 AM.