Raised This Month: $51 Target: $400
 12% 

GET ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jonatat
Senior Member
Join Date: Dec 2017
Old 07-08-2018 , 09:18   GET ID
Reply With Quote #1

I have a menu with current players in server. How can i take player STEAMID? Now i'm getting only my STEAMID not choosed player. My code:

PHP Code:
public showstats(id

new 
players[32], numszName[32], gt 
new statsmenu menu_create("CURRENT PLAYERS IN SERVER""showstats_exit"
get_players(playersnum); 
for(new 
i=0;i<num;i++) 

get_user_name(players[i], szNamecharsmax(szName)) 
gt players[i]
if(
get_user_flags(gt)) 

formatex(szNamecharsmax(szName), "%s"szName
menu_additem(statsmenuszName

menu_setprop(statsmenu,MPROP_EXITNAME,"Quit")
}
menu_display(idstatsmenu)
return 
PLUGIN_HANDLED;
}

public 
showstatsmenu(id

new 
szName[32]
new 
playerstatsmenu menu_create("Player STEAMID""showstats_exit"
new 
auth[32]; 
get_user_authid(idauthsizeof (auth));

formatex(szNamecharsmax(auth), "STEAM ID: %s"auth[id]) 
menu_addtext2(playerstatsmenuauth

menu_setprop(playerstatsmenu,MPROP_EXITNAME,"Quit")
menu_display(idplayerstatsmenu)
return 
PLUGIN_HANDLED;

I want:

CURRENT PLAYERS IN SERVER MENIU:

1) Player1
2) Player2
3) Player3
and etc.

I choosed: Player 1 by pressing 1 and get another meniu with:

Choosed Player 1 menu:

STEAM ID: STEAM_0:0:1234543

Thanks for helping!
jonatat is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-08-2018 , 11:07   Re: menu_create GET STEAMID
Reply With Quote #2

what is the exactly purpose of that?
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Old 07-08-2018, 11:08
CrazY.
This message has been deleted by CrazY.. Reason: nvm
jonatat
Senior Member
Join Date: Dec 2017
Old 07-08-2018 , 11:13   Re: menu_create GET STEAMID
Reply With Quote #3

Quote:
Originally Posted by ^SmileY View Post
what is the exactly purpose of that?
To get selected user steamid and more stuff
jonatat is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-08-2018 , 11:33   Re: menu_create GET STEAMID
Reply With Quote #4

Spoiler
__________________









Last edited by CrazY.; 07-08-2018 at 11:53.
CrazY. is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 07-08-2018 , 15:02   Re: menu_create GET STEAMID
Reply With Quote #5

@crazy:

PHP Code:
if (pevPlayer == this)
            continue; 
is it really necessary? if so, can u explain what does it mean, im interested
JocAnis is offline
jonatat
Senior Member
Join Date: Dec 2017
Old 07-08-2018 , 15:05   Re: menu_create GET STEAMID
Reply With Quote #6

Quote:
Originally Posted by JocAnis View Post
@crazy:

PHP Code:
if (pevPlayer == this)
            continue; 
is it really necessary? if so, can u explain what does it mean, im interested
This is do not show player who writen /command
jonatat is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 07-08-2018 , 21:32   Re: menu_create GET STEAMID
Reply With Quote #7

Quote:
Originally Posted by JocAnis View Post
@crazy:

PHP Code:
if (pevPlayer == this)
            continue; 
is it really necessary? if so, can u explain what does it mean, im interested
Pretty sure to not show the player's steamid in the menu, since he wants other's infos not his.
__________________
TheWhitesmith is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-08-2018 , 21:59   Re: menu_create GET STEAMID
Reply With Quote #8

Again, what he need to do with Steam or player, also you need to know if player is connected or not to get more correctly code here
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
JocAnis
Veteran Member
Join Date: Jun 2010
Old 07-09-2018 , 14:48   Re: menu_create GET STEAMID
Reply With Quote #9

a ok..cuz i thought continue would just continue everything, and couldnt think why then to ask that haha
JocAnis is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode