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
 4262

Grabbing Correct Player Name from Entity

by trinity7 - 08-28-2018 - 03:31 PM
#1
Grabbing correct name from an entity. I'm in process of making a protection, which i can leak once finished.It works 100% but is grabbing the wrong person's name.

How would i grab player's name from a ped. for instance if someone sends a ped crash, how would you grab network id from entity (Ped), any help would be appreciated.

This Is the current way im doing it, but its grabbing someone elses name.

             
Code:
 snprintf(buf, sizeof(buf), "~HUD_COLOUR_DAMAGE~%s ~w~Tried To Crash You....", PLAYER::GET_PLAYER_NAME(NETWORK::NETWORK_GET_NETWORK_ID_FROM_ENTITY(....)));

This Is For Xbox... Peace thanks


2021 Best Be Better Then 2020
Reply
#2
Have your tried GET_PLAYER_PED?
Code:
if (Fresh)
{
   Notify("FBModderFresh");
   Notify("SanjuroDev");
}
Reply
#3
Ive also been wondering about using the netID just to detect who spawned an object but not for any protection like your example , if you find out anything more keep us informed if you dont mind :)
Reply
#4
Easy

static Player NETWORK_GET_PLAYER_INDEX_FROM_PED(Ped ped) { return invoke<Player>(0x6C0E2E0125610278, ped); } // 0x6C0E2E0125610278 0x40DBF464 b323


char *playerName = GET_PLAYER_NAME(player);
Reply
#5
(08-28-2018 - 03:31 PM)trinity7 Wrote: Grabbing correct name from an entity. I'm in process of making a protection, which i can leak once finished.It works 100% but is grabbing the wrong person's name.

How would i grab player's name from a ped. for instance if someone sends a ped crash, how would you grab network id from entity (Ped), any help would be appreciated.

This Is the current way im doing it, but its grabbing someone elses name.

             
Code:
 snprintf(buf, sizeof(buf), "~HUD_COLOUR_DAMAGE~%s ~w~Tried To Crash You....", PLAYER::GET_PLAYER_NAME(NETWORK::NETWORK_GET_NETWORK_ID_FROM_ENTITY(....)));

This Is For Xbox... Peace thanks


I don't see this being Nervous for X360..You need a fix'n, with your natives, name space that up so you don't need to do any PLAYER:: / NETWORK:: type stuff. 
That's just creating more work for yourself.   Upside_down
Reply
#6
this is the correct way to grab it
Hidden Content
You must register or login to view this content.

Reply
#7
(09-09-2018 - 02:59 AM)BModzMasterTM Wrote: this is the correct way to grab it
Hidden Content
You must register or login to view this content.

Thank you good sir
Reply
#8
(09-09-2018 - 02:59 AM)BModzMasterTM Wrote: this is the correct way to grab it
Hidden Content
You must register or login to view this content.


that makes sense lol thanks,
Reply
#9
cool lets have a look!!!!!
Reply
#10
i tried it and it always shows **invalid** all the time so im not sure that is the correct way
Reply

Users browsing: 7 Guest(s)