Post: online/offline check
12-23-2014, 11:17 AM #1
seanhellen
Are you high?
(adsbygoogle = window.adsbygoogle || []).push({}); Hi - how can you tell the game to check if your on an online private match or offline private match? I ask as I have used Seb's giveweapon script and it works (except in public matches) but the AK-47 (eg) is 0x17 in offline matches and 0x18 in online matches and I don't particularly want to put 2 menus with the same things in so what I was thinking was something like;

    if(offline)
{
ak47 0x17
}

else
{
ak47 0x18
}


Yes, I know that wouldn't work :p - I just dont know how to check online status. Any help...or redirection to appropriate threads appreciated Smile
(adsbygoogle = window.adsbygoogle || []).push({});
12-26-2014, 05:05 PM #2
seanhellen
Are you high?
Anyone?
01-06-2015, 12:18 AM #3
Yes i think i got a ghetto way.

You must login or register to view this content.
01-06-2015, 09:16 AM #4
seanhellen
Are you high?
Thanks - but Im not sure how to use them or which one of them checks if your online/offline :\
01-06-2015, 11:41 AM #5
i'll check tomorrow.
01-06-2015, 12:00 PM #6
seanhellen
Are you high?
Thanks Smile
01-08-2015, 08:22 AM #7
kiwi_modz
I defeated!
Originally posted by seanhellen View Post
Hi - how can you tell the game to check if your on an online private match or offline private match? I ask as I have used Seb's giveweapon script and it works (except in public matches) but the AK-47 (eg) is 0x17 in offline matches and 0x18 in online matches and I don't particularly want to put 2 menus with the same things in so what I was thinking was something like;

    if(offline)
{
ak47 0x17
}

else
{
ak47 0x18
}


Yes, I know that wouldn't work :p - I just dont know how to check online status. Any help...or redirection to appropriate threads appreciated Smile


The bytes change not by online or offline well thats from my experience from coding for this game. my research shows it changes via each map only by 1 number + or 1 number - for example the ak47 could be 0x18 on dome but 0x17 on seatown. i used this to fix that problem.

The weapons are in dec so just convert your weapon byte by googling a hex to dec converter and use that.
Give weapon function.
    public static void GiveWeapon(uint Client, int WeaponID)
{
PS3.WriteInt32(0x0110a4fc + (Client * 0x3980), WeaponID);
PS3.WriteInt32(0x0110a624 + (Client * 0x3980), WeaponID);
PS3.WriteInt32(0x0110a6a4 + (Client * 0x3980), WeaponID);
PS3.WriteInt32(0x0110a5f0 + (Client * 0x3980), WeaponID);
RPC.Call(0x18A29C, 0xFCA280 + (Client * 0x280), WeaponID, "", 9999, 9999);
}


Client number is based off the dataGridView1.CurrentRow.Index via contextmenustrip.
this function will check what map your on. check if the client is alive. and send the correct bytes to the memory for that particular weapon on that particular map Smile.
    int Value = 0;
byte[] buffer = new byte[100];
PS3.GetMemory(0x8360d5, ref buffer);
System.Text.ASCIIEncoding Encoding = new System.Text.ASCIIEncoding();
string Map = Encoding.GetString(buffer).Split(Convert.ToChar(0x5c))[6];
if (Map == "mp_seatown" | Map == "mp_plaza2" | Map == "mp_exchange" | Map == "mp_bootleg" | Map == "mp_alpha" | Map == "mp_village" | Map == "mp_bravo" | Map == "mp_courtyard_ss" | Map == "mp_aground_ss")
Value = -1;
else
Value = 0;

if (PS3.ReadInt(0xFCA41D + ((uint)dataGridView1.CurrentRow.Index * 0x280)) > 0) // Cheacks If Client Is Alive
{
GiveWeapon((uint)dataGridView1.CurrentRow.Index, 28 + Value);//acr
}
01-08-2015, 09:56 AM #8
seanhellen
Are you high?
Originally posted by ResistTheKiwi View Post
The bytes change not by online or offline well thats from my experience from coding for this game. my research shows it changes via each map only by 1 number + or 1 number - for example the ak47 could be 0x18 on dome but 0x17 on seatown. i used this to fix that problem.

The weapons are in dec so just convert your weapon byte by googling a hex to dec converter and use that.
Give weapon function.
    public static void GiveWeapon(uint Client, int WeaponID)
{
PS3.WriteInt32(0x0110a4fc + (Client * 0x3980), WeaponID);
PS3.WriteInt32(0x0110a624 + (Client * 0x3980), WeaponID);
PS3.WriteInt32(0x0110a6a4 + (Client * 0x3980), WeaponID);
PS3.WriteInt32(0x0110a5f0 + (Client * 0x3980), WeaponID);
RPC.Call(0x18A29C, 0xFCA280 + (Client * 0x280), WeaponID, "", 9999, 9999);
}


Client number is based off the dataGridView1.CurrentRow.Index via contextmenustrip.
this function will check what map your on. check if the client is alive. and send the correct bytes to the memory for that particular weapon on that particular map Smile.
    int Value = 0;
byte[] buffer = new byte[100];
PS3.GetMemory(0x8360d5, ref buffer);
System.Text.ASCIIEncoding Encoding = new System.Text.ASCIIEncoding();
string Map = Encoding.GetString(buffer).Split(Convert.ToChar(0x5c))[6];
if (Map == "mp_seatown" | Map == "mp_plaza2" | Map == "mp_exchange" | Map == "mp_bootleg" | Map == "mp_alpha" | Map == "mp_village" | Map == "mp_bravo" | Map == "mp_courtyard_ss" | Map == "mp_aground_ss")
Value = -1;
else
Value = 0;

if (PS3.ReadInt(0xFCA41D + ((uint)dataGridView1.CurrentRow.Index * 0x280)) > 0) // Cheacks If Client Is Alive
{
GiveWeapon((uint)dataGridView1.CurrentRow.Index, 28 + Value);//acr
}


Ah - many thanks kiwi - I have read about this somewhere, but not thought about it Happy I should have said, I am using OSM's sprax menu base so its in C++ - so am I right in thinking the following should work;

    if (Func::MapName() == "mp_seatown" | Func::MapName() == "mp_plaza2" | Func::MapName() == "mp_exchange" | Func::MapName() == "mp_bootleg" |Func:: MapName() == "mp_alpha" | Func::MapName() == "mp_village" | Func::MapName() == "mp_bravo" | Func::MapName() == "mp_courtyard_ss" | Func::MapName() == "mp_aground_ss")
{
Weapons::GiveWeapon(client, (0x00, 0x00, 0x17));
Func::iPrintln(client, "^2[AK-47] ^7Given");
}
else
{
Weapons::GiveWeapon(client, (0x00, 0x00, 0x1Cool Man (aka Tustin));
Func::iPrintln(client, "^2[AK-47] ^7Given");
}


also, Could Your give wepaon func work for sprx too? I ask as I have been using sebs func which works fine, but it adds guns so you could end up scrolling through 20 guns lol...judging by the 1st offset, it drops the gun? I would prefer a way to swap pri/sec gun rather than adding to them. Happy Also, there are offsets for pri/sec/tac/lethals but sebs func doesn't have and offsets and yours dont match up so m=now I'm very confused Eek

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo