Raised This Month: $32 Target: $400
 8% 

How to request username to a player?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Santi.
Member
Join Date: Oct 2010
Location: Cordoba(Argentina)
Old 06-05-2017 , 22:16   How to request username to a player?
Reply With Quote #1

Hello there, I'm doing an account system and I want each player to use a unique username without using the console. I'd like to know how to ask them for the username they want for their account. For instance typing it on the chat.

Last edited by Santi.; 06-06-2017 at 00:24.
Santi. is offline
sdz
Senior Member
Join Date: Feb 2012
Old 06-06-2017 , 07:24   Re: How to request username to a player?
Reply With Quote #2

hook chat or use OnClientSayCommand, use a boolean to determine whether or not the text typed in chat was a reply to the question or input
sdz is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-07-2017 , 12:50   Re: How to request username to a player?
Reply With Quote #3

Quote:
Originally Posted by EasSidezz View Post
hook chat
...
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-07-2017 , 14:56   Re: How to request username to a player?
Reply With Quote #4

Quote:
Originally Posted by KissLick View Post
...
Why not ?
__________________
Want to check my plugins ?
Arkarr is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-07-2017 , 16:06   Re: How to request username to a player?
Reply With Quote #5

Quote:
Originally Posted by Arkarr View Post
Why not ?
Because we have OnClientSayCommand ;-)
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-08-2017 , 07:56   Re: How to request username to a player?
Reply With Quote #6

Quote:
Originally Posted by KissLick View Post
Because we have OnClientSayCommand ;-)
This won't listen only to commands? I mean, what if I want to do something like :
Code:
+--------- chat ----------+
+ Enter a username :      +
+ Mike                    + --> player input
+ User "Mike" Found !     +
+ ...                     +
+-------------------------+
I can't test now...
__________________
Want to check my plugins ?

Last edited by Arkarr; 06-08-2017 at 07:57.
Arkarr is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-08-2017 , 12:11   Re: How to request username to a player?
Reply With Quote #7

Quote:
Originally Posted by Arkarr View Post
This won't listen only to commands
Did you read the docs? Have you ever used this forward?

Let me quote from the docs...
Quote:
Global listener for the chat commands.
It is a forward provided by the core that fires whenever a client uses a chat command such as say, say2, say_team, say_team2, print, echo, ...

Coding the example you gave us would be easier and more elegant with the OnClientSayCommand forward.
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 06-08-2017 , 13:13   Re: How to request username to a player?
Reply With Quote #8

Quote:
Originally Posted by KissLick View Post
Did you read the docs? Have you ever used this forward?

Let me quote from the docs...


It is a forward provided by the core that fires whenever a client uses a chat command such as say, say2, say_team, say_team2, print, echo, ...

Coding the example you gave us would be easier and more elegant with the OnClientSayCommand forward.
My apologies, my english wasn't good enough. I misunderstood it.
Thanks for clarification.
__________________
Want to check my plugins ?
Arkarr is offline
Reply


Thread Tools
Display Modes

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 08:24.


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