.
PS3  Playerlist Question ??
by Torxi - 06-12-2019 - 08:41 AM
06-15-2019 - 01:56 AM #11
(06-15-2019 - 12:09 AM)Torxi Wrote: #pragma region MENU PLAYER INFOS
void playerinfo(bool SelectPlayer) // Put your Player Info Here  int SelectPlayer
{

LPCSTR weapnamep; Hash weap;
Player ui_currentPlayer = currentOption - 1;
Player ui_slectedPlayer = selectedPlayer; // Ok
Player OnlinePlayer = PLAYER::GET_PLAYER_PED(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer);
Vector3 Coords = ENTITY::GET_ENTITY_COORDS(OnlinePlayer, 1);
char  wanted[50], DeadOrAlive[50], Rank[50], MutedMe[50], modmenu[50], invincible[50]; // IsArmed[50],

float menuPos = 0.675f; //0.658f                                                                  //38
drawText(PLAYER::GET_PLAYER_NAME(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer), 4, 0.658f, -0.038f, 0.65f, 0.090f, 255, 255, 255, bannerTextOpacity, true);
sprintf(invincible, "%s", PLAYER::GET_PLAYER_INVINCIBLE(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer) ? "~HUD_COLOUR_SOCIAL_CLUB~Godmode  " : "kein Modder");
sprintf(MutedMe, "%s", NETWORK::NETWORK_AM_I_MUTED_BY_PLAYER(OnlinePlayer) ? "~HUD_COLOUR_SOCIAL_CLUB~Muted" : "~w~Not Muted");
sprintf(Rank, "Lvl:  ~HUD_COLOUR_SOCIAL_CLUB~%i", getPlayerRank(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer));
sprintf(DeadOrAlive, "%s", PED::_IS_PED_DEAD(OnlinePlayer, 1) ? "~HUD_COLOUR_WAYPOINT~Dead" : "~HUD_COLOUR_SOCIAL_CLUB~Alive");
snprintf(wanted, sizeof(wanted), "~w~Stars: ~HUD_COLOUR_SOCIAL_CLUB~%i", (int)PLAYER::GET_PLAYER_WANTED_LEVEL(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer));
// ~y~DAS IST DAS NEUE
int KD = Read_Global(1581972 + (306 * ui_currentPlayer));
float KD_Float = ItoF(KD);
char * KD_String = FtoS(KD_Float);
char KD_buf[90];
snprintf(KD_buf, sizeof(KD_buf), "KD:  ~HUD_COLOUR_SOCIAL_CLUB~%s", KD_String);
char*Health[50];
if (ENTITY::DOES_ENTITY_EXIST(PLAYER::GET_PLAYER_PED(SelectPlayer)))
{
//text
Vector3 myCoords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 1);
Vector3 Coords = GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer - 1), 1);
int health = ENTITY::GET_ENTITY_HEALTH(PLAYER::GET_PLAYER_PED(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer - 1));

int Distance = GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(myCoords.x, myCoords.y, myCoords.z, Coords.x, Coords.y, Coords.z, 0);
int car = GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer - 1), 0);
int ISVehicle = PED::IS_PED_IN_VEHICLE(PLAYER::GET_PLAYER_PED(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer - 1), car, 1);
int street = 0;
float speed = ENTITY::GET_ENTITY_SPEED(PLAYER::GET_PLAYER_PED(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer - 1));
int convertedspeed = (int)speed;
char healthtext[65];

char speedtext[65];
char vehicletext[65];
char distancetext[65];
char Autotext[65];
char GUNtext[65];
char* NameCar;
char Health[50];
int PlayerVehicle = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED(SelectPlayer), true);
if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::GET_PLAYER_PED(SelectPlayer), true)) { NameCar = UI::_0x95C4B5AD(VEHICLE::GET_DISPLAY_NAME_FROM_VEHICLE_MODEL(ENTITY::GET_ENTITY_MODEL(PlayerVehicle))); }// PlayerVehicle
else { NameCar = "Kein Auto"; }

WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::GET_PLAYER_PED(SelectPlayer), &weap, 1);
GET_WEAPON_NAME(weap, weapnamep);
sprintf(Health, "Health: ~HUD_COLOUR_SOCIAL_CLUB~ %d / 328", ENTITY::GET_ENTITY_HEALTH(OnlinePlayer), GET_ENTITY_MAX_HEALTH(OnlinePlayer)); // Neu
char crewnmae[500];
char Money[50];
snprintf(Money, sizeof(Money), "Money: ~HUD_COLOUR_SOCIAL_CLUB~%i", (int)getCash(SelectPlayer ? ui_currentPlayer : ui_slectedPlayer));
sprintf(vehicletext, "In Vehicle: ~HUD_COLOUR_SOCIAL_CLUB~ %d", ISVehicle);
sprintf(speedtext, "Speed: ~HUD_COLOUR_SOCIAL_CLUB~ %d", convertedspeed);
sprintf(distancetext, "Distanz: ~HUD_COLOUR_SOCIAL_CLUB~%d", Distance);
sprintf(Autotext, "Car: ~HUD_COLOUR_SOCIAL_CLUB~ %s", NameCar);
sprintf(GUNtext, "Gun: ~HUD_COLOUR_SOCIAL_CLUB~ %s", weapnamep);
sprintf(crewnmae, "~w~Crew: ~HUD_COLOUR_SOCIAL_CLUB~ %s", getPlayerCrewName(SelectPlayer));

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(Health, -0.038f + menuPos, 0.119f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(Money, -0.038f + menuPos, 0.140f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(KD_buf, -0.038f + menuPos, 0.161f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(Rank, -0.038f + menuPos, 0.182f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(GUNtext, -0.038f + menuPos, 0.203f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(wanted, -0.038f + menuPos, 0.224f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(DeadOrAlive, -0.038f + menuPos, 0.245f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(distancetext, -0.038f + menuPos, 0.266f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(invincible, -0.038f + menuPos, 0.287f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(!strcmp(speedtext, "Speed: ~HUD_COLOUR_SOCIAL_CLUB~ 1") ? (char *)"Speed: ~HUD_COLOUR_SOCIAL_CLUB~ Walk" : !strcmp(speedtext, "Speed: ~HUD_COLOUR_WAYPOINT~ 0") ? (char *)"Speed: ~HUD_COLOUR_WAYPOINT~ Idle" : speedtext, -0.038f + menuPos, 0.308f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(Autotext, -0.038f + menuPos, 0.329f);

setupdraw();
UI::SET_TEXT_FONT(6);
UI::SET_TEXT_SCALE(0.45f, 0.45f);
UI::SET_TEXT_COLOUR(255, 255, 255, 255);
UI::SET_TEXT_CENTRE(0);
drawstring(crewnmae, -0.038f + menuPos, 0.350f);

// L+R     H+R         lang
GRAPHICS::DRAW_RECT(-0.008f + 0.686f, 0.270f, 0.1f, 0.30f, 16, 16, 16, backgroundOpacity); // Back Ground 2735 NEUE 0.638f, 0.3590, 0.1f, 0.41f,
}
}

Your code is unnecessarily big. 
Try use NETWORK_IS_PLAYER_CONNECTED in place of DOES_ENTITY_EXIST.


Reply

06-15-2019 - 06:50 AM #12
Can certainly some resize in the code

Reply

06-15-2019 - 01:44 PM #13
(06-15-2019 - 06:50 AM)Torxi Wrote: Can certainly some resize in the code

sure

Reply

06-18-2019 - 09:46 AM #14
Problem solved as always only one thing that changes everything


void Thread(uint64_t nothing)
{
sleep(39500); <--- from 10000 to 39500 up set
g_Natives = (Native_s**)FindNativeTableAddress();
PatchInJump(NativeAddress(0x9FAB6729, true), (int)Hook, false);
sys_ppu_thread_exit(nothing);
}

Reply

06-19-2019 - 06:04 PM #15
(06-12-2019 - 08:41 AM)Torxi Wrote: My game lag when I open the player list, can I fix it with the sleep functions?

Thanks for Help, Peace !!

Reply




Users browsing this thread:
1 Guest(s)