ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 2126

Working Aparment Reader

by Hynodgy - 02-22-2020 - 04:47 PM
#1
Hi, there was a leak of Aparment Reader earlier which wasn't working correctly and was returning incorrect apartment names.
I remade it and now it's working fine. It's nothing private so i think i could post it here.. Smile

Code:
//outside loops
int getPlayerStat(int player, int stat)
{
return Read_Global(1581767 + (player * 306) + stat);
}

char* GetProperty(int player, int proprty)
{
{
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(player))
{
char proprtyLabel[1024];
int globalHash = getPlayerStat(player, proprty);
snprintf(proprtyLabel, 1024, "%s", PropertyNameList[globalHash]);
return proprtyLabel;
}
else
return "None";
}
}

//into emus
char *PropertyNameList[] =
{
"None",
"Eclipse Towers, 31",
"Eclipse Towers, 9",
"Eclipse Towers, 40",
"Eclipse Towers, 5",
"Alta St, 10",
"Alta St, 57",
"Del Perro H, 20",
"Power St, 3",
"Spanish Ave, 1",
"Las L Blvd, 4",
"Milton Rd, 13",
"The Royale, 19",
"S Mo Milton Dr",
"Bay City Ave, 45",
"South Rockford Dr",
"Dream Towers, 15",
"Las L Blvd, 9",
"San Vitas, 2",
"Rockford Dr, 13",
"Vespucci Blvd, 1",
"Cougar Ave, 19",
"Prosperity St, 21",
"Del Perro Blvd, 18",
"Murriets Heights",
"Popular St, 14",
"Popular St, 2",
"Supply St",
"Olympic Fwy, 1",
"0754 Roy L Blvd",
"Little Bighorn Ave",
"",
"0552 Roy L Blvd",
"0432 Davis Ave",
"Del Perro H, 7",
"Weazel Plaza, 101",
"Weazel Plaza, 70",
"Weazel Plaza, 26",
"Integrity Way, 30",
"Integrity Way, 35",
"Richards Maj, 4",
"Richards Maj, 51",
"Tinsel Towers, 45",
"Tinsel Towers, 29",
"142 Paleto Blvd",
"Strawberry Ave",
"1932 Grapeseed Ave",
"Senora Way",
"Great Ocean Highway",
"197 Route 68",
"870 Route 68",
"1200 Route 68",
"8754 Route 68",
"1905 Davis Ave",
"",
"Dry Dock St",
"1337 H4x Way",
"Greenwich Pkwy, 76",
"Innocence Blvd",
"Del Perro Blvd, 634",
"Mirror Park Blvd",
"Eclipse Towers, 3",
"Del Perro H, 4",
"Richards Maj, 2",
"Tinsel Towers, 42",
"Integrity Way, 28",
"Hangman Ave",
"Sustancia Rd",
"4584 Procopio Dr",
"4401 Procopio Dr",
"0232 Paleto Blvd",
"Zancudo Ave",
"1893 Grapeseed Ave",
"Unit 124 Popular St"
};

//into your info box
char Buff1[1024];
char Buff2[1024];
char Buff3[1024];
sprintf(Buff1, "~w~Apt 1: %s", GetProperty(player, 0xEB));
sprintf(Buff2, "~w~Apt 2: %s", GetProperty(player, 0xEC));
sprintf(Buff3, "~w~Apt 3: %s", GetProperty(player, 0xED));


If you are going to use it, don't forget to leave credit. Smile
Enjoy...


Serozoid - FREE & FOREVER
Reply
#2
nothing new, dont share shared codes men
Reply
#3
nasty way todo it.
Reply
#4
(02-27-2020 - 12:03 PM)Niqqie Wrote: nasty way todo it.
you can say that again, i have done mine in one line which saving more space and it read all apartment 100%
Reply
#5
ewwww that snit hurts my eyes :D pls clean it up
Reply
#6
Thanks for release :)
Reply
#7
this have some leaked bases too xD
Reply
#8
(02-22-2020 - 04:47 PM)Hynodgy Wrote:
Hi, there was a leak of Aparment Reader earlier which wasn't working correctly and was returning incorrect apartment names.
I remade it and now it's working fine. It's nothing private so i think i could post it here.. Smile

Code:
//outside loops
int getPlayerStat(int player, int stat)
{
return Read_Global(1581767 + (player * 306) + stat);
}

char* GetProperty(int player, int proprty)
{
{
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(player))
{
char proprtyLabel[1024];
int globalHash = getPlayerStat(player, proprty);
snprintf(proprtyLabel, 1024, "%s", PropertyNameList[globalHash]);
return proprtyLabel;
}
else
return "None";
}
}

//into emus
char *PropertyNameList[] =
{
"None",
"Eclipse Towers, 31",
"Eclipse Towers, 9",
"Eclipse Towers, 40",
"Eclipse Towers, 5",
"Alta St, 10",
"Alta St, 57",
"Del Perro H, 20",
"Power St, 3",
"Spanish Ave, 1",
"Las L Blvd, 4",
"Milton Rd, 13",
"The Royale, 19",
"S Mo Milton Dr",
"Bay City Ave, 45",
"South Rockford Dr",
"Dream Towers, 15",
"Las L Blvd, 9",
"San Vitas, 2",
"Rockford Dr, 13",
"Vespucci Blvd, 1",
"Cougar Ave, 19",
"Prosperity St, 21",
"Del Perro Blvd, 18",
"Murriets Heights",
"Popular St, 14",
"Popular St, 2",
"Supply St",
"Olympic Fwy, 1",
"0754 Roy L Blvd",
"Little Bighorn Ave",
"",
"0552 Roy L Blvd",
"0432 Davis Ave",
"Del Perro H, 7",
"Weazel Plaza, 101",
"Weazel Plaza, 70",
"Weazel Plaza, 26",
"Integrity Way, 30",
"Integrity Way, 35",
"Richards Maj, 4",
"Richards Maj, 51",
"Tinsel Towers, 45",
"Tinsel Towers, 29",
"142 Paleto Blvd",
"Strawberry Ave",
"1932 Grapeseed Ave",
"Senora Way",
"Great Ocean Highway",
"197 Route 68",
"870 Route 68",
"1200 Route 68",
"8754 Route 68",
"1905 Davis Ave",
"",
"Dry Dock St",
"1337 H4x Way",
"Greenwich Pkwy, 76",
"Innocence Blvd",
"Del Perro Blvd, 634",
"Mirror Park Blvd",
"Eclipse Towers, 3",
"Del Perro H, 4",
"Richards Maj, 2",
"Tinsel Towers, 42",
"Integrity Way, 28",
"Hangman Ave",
"Sustancia Rd",
"4584 Procopio Dr",
"4401 Procopio Dr",
"0232 Paleto Blvd",
"Zancudo Ave",
"1893 Grapeseed Ave",
"Unit 124 Popular St"
};

//into your info box
char Buff1[1024];
char Buff2[1024];
char Buff3[1024];
sprintf(Buff1, "~w~Apt 1: %s", GetProperty(player, 0xEB));
sprintf(Buff2, "~w~Apt 2: %s", GetProperty(player, 0xEC));
sprintf(Buff3, "~w~Apt 3: %s", GetProperty(player, 0xED));


If you are going to use it, don't forget to leave credit. Smile
Enjoy...


Serozoid - FREE & FOREVER
nice
Reply
#9
Thanks man for post nice
Reply
#10
thank you this could be useful
Reply

Users browsing: 3 Guest(s)