Search Player Name in Dialog [REP+]
#1

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.
Reply
#2

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

I already searched, i didn't find anything helpful
Reply
#4

Here

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

The problem is: the one you can't download and the other you must script yourself i know the scripts
Reply
#6

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;
}
Reply
#7

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!
Reply
#8

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

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.
Reply
#10

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.
Reply
#11

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.
Reply
#12

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;
    } 
Reply
#13

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.
Reply
#14

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.
Reply
#15

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
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)