#define PLAYER_PROCURANDO 0 // Retorna se o player estб procurando alguйm ou nгo
#define PLAYER_PROCURANDO_ID 1 // Retorna a ID que o player tб procurando
#define PLAYER_SENDO_PROCURADO 2 // Retorna se o player estб sendo procurado
#define PLAYER_SENDO_PROCURADO_POR_ID 3 // Retorna a ID do cara que tб te procurando
forward ProcurarPlayer(playerid, procurarid, cor); //playerid : O player pra quem vai aparecer a marker, procurarid, o cara que vai ser procurado e a cor vai mudar a cor do procurado para a que vocк escolher, lembrando que sу muda pro playerid.
forward ProcurarInfo(playerid, procurado, info); // Ele retorna informaзхes as #defines vгo na info. Vocк precisa, necessariamente colocar ou o playerid ou o procurado (:
forward PararProcurarPlayer(playerid, procuradoid); // Ele para de procurar alguйm, lembrando que vocк tem que colocar o playerid e o procurado.
#include <a_samp>
#include <a_players>
// Como eu usei PVars, nгo precisa limpar as Variaveis quando desloga :D
#define PLAYER_PROCURANDO 0 // Retorna se o player estб procurando alguйm ou nгo
#define PLAYER_PROCURANDO_ID 1 // Retorna a ID que o player tб procurando
#define PLAYER_SENDO_PROCURADO 2 // Retorna se o player estб sendo procurado
#define PLAYER_SENDO_PROCURADO_POR_ID 3 // Retorna a ID do cara que tб te procurando
forward ProcurarPlayer(playerid, procurarid, cor);
forward ProcurarInfo(playerid, procurado, info);
forward PararProcurarPlayer(playerid, procuradoid);
public ProcurarPlayer(playerid, procurarid, cor)
{
if(!ProcurarInfo(playerid, -1, 0))
{
SetPlayerMarkerForPlayer( playerid , procurarid , cor );
SetPVarInt( playerid, "Procurando" , 1 );
SetPVarInt( playerid, "ProcurandoID" , procurarid );
SetPVarInt( procurarid, "Procurado", 1 );
SetPVarInt( procurarid, "ProcuradoPeloID", playerid );
}
else
{
SendClientMessage(playerid, 0xFFFFAAAA, "Vocк jб estб procurando alguйm!");
}
}
public ProcurarInfo(playerid, procurado, info)
{
new r;
if(info == 0) r = GetPVarInt(playerid, "Procurando");
if(info == 1) r = GetPVarInt(playerid, "ProcurandoID");
if(info == 3) r = GetPVarInt(procurado, "Procurado");
if(info == 4) r = GetPVarInt(procurado, "ProcuradoPeloID");
return r;
}
public PararProcurarPlayer(playerid, procuradoid)
{
if(!ProcurarInfo(playerid, -1, 0)) {}
else
{
SetPlayerMarkerForPlayer( playerid, procuradoid, ( GetPlayerColor( procuradoid ) & 0xFFFFFF00 ) );
}
}
public OnGameModeInit()
{
print("Vocк carregou com sucesso o Sistema de Detetive!");
return 1;
}
if(!strcmp(cmdtext, "/QuemMeEspiarEGay"))
{
new msg[50], pName[21];
GetPlayerName(ProcurarInfo(-1, playerid, PLAYER_SENDO_PROCURADO_POR_ID), pName, 20);
format(msg, 50, "O Player %s й Gay.", pName );
}
fiz nas pressas deu um trovгo aqui que quase me cago todo =O |
public PararProcurarPlayer(playerid, procuradoid)
{
if(!ProcurarInfo(playerid, -1, 0)) {}
else
{
SetPlayerMarkerForPlayer( playerid, procuradoid, ( GetPlayerColor( procuradoid ) & 0xFFFFFF00 ) );
}
}
public PararProcurarPlayer(playerid, procuradoid)
{
if(ProcurarInfo(playerid, -1, 0))
{
SetPlayerMarkerForPlayer( playerid, procuradoid, ( GetPlayerColor( procuradoid ) & 0xFFFFFF00 ) );
}
}
public ProcurarInfo(playerid, procurado, info)
{
new r;
if(info == 0) r = GetPVarInt(playerid, "Procurando");
if(info == 1) r = GetPVarInt(playerid, "ProcurandoID");
if(info == 3) r = GetPVarInt(procurado, "Procurado");
if(info == 4) r = GetPVarInt(procurado, "ProcuradoPeloID");
return r;
}
public ProcurarInfo(playerid, procurado, info)
{
if(info == 0) return GetPVarInt(playerid, "Procurando");
if(info == 1) return GetPVarInt(playerid, "ProcurandoID");
if(info == 3) return GetPVarInt(procurado, "Procurado");
if(info == 4) return GetPVarInt(procurado, "ProcuradoPeloID");
}
Se voce achava que voce era noob..Olha minhas duvidas do tempo que eu comecei aqui no Fуrum samp:
https://sampforum.blast.hk/showthread.php?tid=183794 Pode procurar la por estes tempos...Tem um monte de dъvidas que hoje eu paro para olhar e nao acredito que aquilo era realmente eu '-'... Mas й isso ai voce estб se saindo muito bem...A cada dia vejo voce evoluindo mais e mais,,Parabens |