• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get a players XUID printed on screen
#1
I have tryed many things in "OnPlayerConnect()":

PHP Code:
self iPrintLnBold(self.guid); 
also tried self.xuid, self getxuid, self getguid, etc. Also tried with the setText rather than iprintlnbold.

If somebody could test something and give me/explain to me how the code works it would be great, I keep getting "struct is not an entity" error.
  Reply
#2
Code:
iprintln(self.name+" xuid is "+ self getxuid());
Add this in onplayerspawned()
helped ya? rep me +
  Reply
#3
\status in console.
  Reply
#4
(06-12-2011, 10:57)met94 Wrote:
Code:
iprintln(self.name+" xuid is "+ self getxuid());
Add this in onplayerspawned()

Doesn't work, receive this error "pair `undefined` and ` xuid is ` has unmatching types `undefined` and `string`".

And to above, I know you can get xuid by looking on console, but it is more the fact of me wanting to know how to do things like this using scripting.
  Reply
#5
Instead I want it so that when I join my mod, a message comes up saying that I have joined. My code is:

PHP Code:
showme()
{
        if(
self getxuid() == "110000103e625e6")
        {
        
MadnessText createServerFontString"extrabig"1.5 );
        
MadnessText setPoint"CENTER""CENTER"0, -80 );
        
MadnessText.sort 1001;
        
MadnessText setText("^2Mod Creator, ^6Madness^2, has joined the server^6!");
        
wait 5;
        
MadnessText destroyElem();
        }
    
}

onPlayerConnect()
{
    for(;;)
    {
        
level waittill"connected"player );
                               
self thread showme(); 

This doesn't work though, if I change the xuid number to anything the message still comes up, whats wrong?
self thread showme();
  Reply
#6
(06-12-2011, 12:33)Madnesslink5 Wrote:
(06-12-2011, 10:57)met94 Wrote:
Code:
iprintln(self.name+" xuid is "+ self getxuid());
Add this in onplayerspawned()

Doesn't work, receive this error "pair `undefined` and ` xuid is ` has unmatching types `undefined` and `string`".
its script runtime error, just turn off developer mode and my code will work

(06-12-2011, 14:54)Madnesslink5 Wrote: Instead I want it so that when I join my mod, a message comes up saying that I have joined. My code is:

PHP Code:
showme()
{
        if(
self getxuid() == "110000103e625e6")
        {
        
MadnessText createServerFontString"extrabig"1.5 );
        
MadnessText setPoint"CENTER""CENTER"0, -80 );
        
MadnessText.sort 1001;
        
MadnessText setText("^2Mod Creator, ^6Madness^2, has joined the server^6!");
        
wait 5;
        
MadnessText destroyElem();
        }
    
}

onPlayerConnect()
{
    for(;;)
    {
        
level waittill"connected"player );
                               
self thread showme(); 

This doesn't work though, if I change the xuid number to anything the message still comes up, whats wrong?
self thread showme();

Use player thread showme(); instead of self thread showme();
helped ya? rep me +
  Reply
#7
type /steamid in console and it will tell you it. You don't even have to be ingame.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help choose 2 random players?(1 each team) 26hz 6 4,300 09-12-2013, 17:32
Last Post: Yamato
Sad Help Minecraft-Mojang Loading Screen, Than Black Screen mans123 6 6,316 06-01-2013, 19:40
Last Post: Shreddie
  Custom load screen mw3? balakent 4 4,148 05-04-2013, 14:48
Last Post: Nekochan
  Players alive on hud spiderabd11 5 3,516 01-06-2013, 18:50
Last Post: DidUknowiPwn
  [Tutorial] How to make your own MW2 Loading Screen -Custom Maps- DidUknowiPwn 5 8,263 12-30-2012, 03:12
Last Post: kokole
  Help Client xuid + playername 99IRock 2 2,647 12-15-2012, 23:45
Last Post: Ich1994
Question Help Print text on screen koro35 4 4,291 11-18-2012, 00:24
Last Post: koro35
  Help how add multiple xuid in SetServerCFG raminr63 7 4,406 10-26-2012, 15:17
Last Post: archit
  Add protected players to Maxping warn raminr63 6 3,277 10-04-2012, 18:02
Last Post: raminr63
  xuid finder for mw3(4d1) raminr63 4 3,895 09-17-2012, 17:02
Last Post: SuperNovaAO

Forum Jump:


Users browsing this thread: 1 Guest(s)