SA-MP Forums Archive
Search Player Name in Dialog [REP+] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Search Player Name in Dialog [REP+] (/showthread.php?tid=649044)



Search Player Name in Dialog [REP+] - ImTobi - 01.02.2018

Hey everybody.
Can someone help me, i want to search a name in an MDC System, so that afterwards the Infos of the Player will show, like Wanteds, Name, and so on. But how can i do it? Any tips



Sorry for my bad English.


Re: Search Player Name in Dialog [REP+] - N0FeaR - 01.02.2018

Here you go: http://forum.sa-mp.com/search.php


Re: Search Player Name in Dialog [REP+] - ImTobi - 01.02.2018

I already searched, i didn't find anything helpful


Re: Search Player Name in Dialog [REP+] - N0FeaR - 01.02.2018

Here

https://sampforum.blast.hk/showthread.php?tid=497367
https://sampforum.blast.hk/showthread.php?tid=398494


Re: Search Player Name in Dialog [REP+] - ImTobi - 01.02.2018

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
The problem is: the one you can't download and the other you must script yourself i know the scripts


Re: Search Player Name in Dialog [REP+] - OptimusBloodHunter - 02.02.2018

This function can help you to get player ID from player name, so when you get player id you can get other infos

Код:
stock GetPlayerIDS(string[])
{
    new testname[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{

				GetPlayerName(i, testname, sizeof(testname));
				if(!strcmp(testname, string, true))
				{
					return i;
				}

		}
	}
	return INVALID_PLAYER_ID;
}



Re: Search Player Name in Dialog [REP+] - ImTobi - 03.02.2018

Quote:
Originally Posted by OptimusBloodHunter
Посмотреть сообщение
This function can help you to get player ID from player name, so when you get player id you can get other infos

Код:
stock GetPlayerIDS(string[])
{
    new testname[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{

				GetPlayerName(i, testname, sizeof(testname));
				if(!strcmp(testname, string, true))
				{
					return i;
				}

		}
	}
	return INVALID_PLAYER_ID;
}
Thanks, it worked, now i have a good working mdc system for my rp server, thanks, rly, REP!


Re: Search Player Name in Dialog [REP+] - PepsiCola23 - 03.02.2018

lol?show us the working mdc system you`ve created so others can learn.


Re: Search Player Name in Dialog [REP+] - jasperschellekens - 03.02.2018

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
lol?show us the working mdc system you`ve created so others can learn.
Lol? If everyone did that it wouldnt be unique anymore would it? Pretty sure thats completely up to him and not up to you. You don't learn from others code. You learn from coding yourself.


Re: Search Player Name in Dialog [REP+] - ImTobi - 06.02.2018

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Lol? If everyone did that it wouldnt be unique anymore would it? Pretty sure thats completely up to him and not up to you. You don't learn from others code. You learn from coding yourself.
Yup, same.


Re: Search Player Name in Dialog [REP+] - ImTobi - 07.02.2018

Quote:
Originally Posted by PepsiCola23
Посмотреть сообщение
lol?show us the working mdc system you`ve created so others can learn.


Here you have 1 Screen of the Player Search.
I have another Menu for giving Wanteds.


Re: Search Player Name in Dialog [REP+] - jasperschellekens - 07.02.2018

Sorry but to be honest they kinda look ugly.
Check the one i created:




Also add this onplayerclicktextdraw:
That will fix your problem with pressing ESC.

PHP код:
if(_:clickedid == INVALID_TEXT_DRAW)
    {
       
//close td here
        
return 1;
    } 



Re: Search Player Name in Dialog [REP+] - GTLS - 07.02.2018

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
Sorry but to be honest they kinda look ugly.
Check the one i created:




Also add this onplayerclicktextdraw:
That will fix your problem with pressing ESC.

PHP код:
if(_:clickedid == INVALID_TEXT_DRAW)
    {
       
//close td here
        
return 1;
    } 
Nice MDC mate.


Re: Search Player Name in Dialog [REP+] - Mugala - 08.02.2018

dude, this is not a request section, it's just for help in code or smth like this.
you can search this script in forum if u cant write by yourself.


Re: Search Player Name in Dialog [REP+] - jasperschellekens - 08.02.2018

Quote:
Originally Posted by Mugalito
Посмотреть сообщение
dude, this is not a request section, it's just for help in code or smth like this.
you can search this script in forum if u cant write by yourself.
Reading seems difficult for you... nobody is requesting Anything dude