SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 26/06/2019, 01:59 AM   #1
Draxler22
Little Clucker
 
Join Date: Jun 2019
Posts: 2
Reputation: 0
Post Nome e ID do rival

Gostaria de adicionar o Nome e ID do rival que está bloqueando o uso de tal comando.

Code:
CMD:coletetodos(playerid)
{

	if(!PlayerInfo[playerid][pAdministrador])
	{
		if(GetPlayerColor(playerid) != COR_HLP && GetPlayerColor(playerid) != COR_RTL)
		{
			if(RivalPerto(playerid, 80))
			return SendClientMessageError(playerid, "Você está próximo de um rival (Nome do rival perto: ID)!");
			
		}
	}
}
Está retornando true ou false, não consegui pensar em uma função para fazer retornar o nome e id do rival perto para os players.
Draxler22 is offline   Reply With Quote
Old 26/06/2019, 02:44 AM   #2
1sbedx
Huge Clucker
 
Join Date: Dec 2015
Posts: 248
Reputation: 38
Default Re: Nome e ID do rival

Mostra a função "RivalPerto".
__________________
Estou desenvolvendo por dinheiro, qualquer dúvida entre em contato para negociação.
1sbedx is offline   Reply With Quote
Old 26/06/2019, 03:06 AM   #3
Draxler22
Little Clucker
 
Join Date: Jun 2019
Posts: 2
Reputation: 0
Default Re: Nome e ID do rival

Quote:
Originally Posted by 1sbedx View Post
Mostra a função "RivalPerto".
PHP Code:
stock RivalPerto(playeriddistance

    new 
bool:e
    for(new 
iGetPlayerPoolSize(); <= ji++) 
    { 
        if(
IsPlayerConnected(i)) 
        { 
            if(
PlayerInfo[i][pLogado]) 
            { 
                if(
!= playerid
                { 
                    if(
GetDistanceBetweenPlayers(playeridi) < distance
                    { 
                        if(!
PlayerInfo[playerid][pPolicia]) 
                        { 
                            if(!
PlayerInfo[i][pSpectate] && GetPlayerColor(playerid) != GetPlayerColor(i) && GetPlayerColor(i) != COR_HLP && GetPlayerColor(i) != COR_RTL && GetPlayerColor(i) != COR_MTX && GetPlayerColor(i) != COR_DJ
                            { 
                                if(
GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid)) 
                                { 
                                    
true
                                    break; 
                                } 
                            }  
                        } 
                        else 
                        { 
                            if(!
PlayerInfo[i][pPolicia] && PlayerInfo[i][pLogado] && !PlayerInfo[i][pSpectate] && GetPlayerColor(i) != -&& GetPlayerColor(i) != COR_HLP && GetPlayerColor(i) != COR_RTL && GetPlayerColor(i) != COR_MTX && GetPlayerColor(i) != COR_DJ
                            { 
                                if(
GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid)) 
                                { 
                                    
true
                                    break; 
                                } 
                            }  
                        } 
                    } 
                } 
            } 
        } 
    } 

    if(
e
    { 
        return 
1
    } 
    else 
    { 
        return 
0
    } 

Draxler22 is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] ₪ Outrun Race Mode ₪ [Rival Challenge Anywhere] iPLEOMAX Filterscripts 23 09/04/2014 08:27 PM
[Ajuda] Qual nome do site que escreve o nome do server e mostra o IP? RicardoMaia Português/Portuguese 4 16/12/2013 07:05 PM
Rival War rarmand Scripting Help 1 15/02/2012 02:04 PM


All times are GMT. The time now is 06:31 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.