Apenas 2 Players Fazer o Mesmo Comando -
ReDKiiL - 29.05.2011
Bom Gente Queria Sabe Como Faзo Para 2 Players Fazer o Mesmo Comando
й Porque Estou Tentando Criar Um X1 Que Vai Apenas 2 Pessoas
e Quando Uma Morrer Liberar Vaga Para o Player Entrar Se Alguem Saber Posta Ai Obrigado!
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando - rjjj - 29.05.2011
Bem, hб um tutorial aqui no fуrum sobre isso, mas isto deve resolver o seu problema

.
Coloque:
pawn Код:
//No Topo do GM:
new PessoasX1;
//No seu comando de ir ao X1:
if(PessoasX1 == 2) return SendClientMessage(playerid,0xFFFFFFAA,"Mбximo de jogadores no X1 = 2");
SetPVarInt(playerid,"InX1", true);
PessoasX1++;
//Por fim, no seu OnPlayerDeath:
if(GetPVarInt(playerid,"InX1")) SetPVarInt(playerid,"InX1", false), PessoasX1--;
Espero ter ajudado

.
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando -
GuikBretas - 29.05.2011
pawn Код:
//Inнcio do GM
new ComandoUsado = 0;
//Dentro do Comando
ComandoUsado += 1;
if(ComandoUsado == 2) return SendClientMessage(playerid, COR, "Sу [nъmero] pessoas podem usar esse comando");
//OnPlayerDeath
if(ComandoUsado == 2) ComandoUsado = 0;
Tenta usar isso pra ver se funciona, num deu pra mim testar.
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando -
The Knight - 29.05.2011
Para a prуxima vez procure, ok? (:
Tinha respondido hб umas horas atrбs ao mesmo pedido:
Vou explicar, depois adapte ao seu comando.
Topo:
PHP код:
new kMorreu[ MAX_PLAYER_NAME ];
new kMatou[ MAX_PLAYER_NAME ];
new bool:kX1[ MAX_PLAYERS ];
new kQuantidade;
new sStr[ 128 ];
Comando:
PHP код:
if( !strcmp( cmdtext, "/kX1", true ) )
{
if( kQuantidade == 2 ) return SendClientMessage( playerid, -1, "O x1 estб cheio (2 pessoas)" );
SetPlayerPos(playerid,pos1,pos2,pos3);
GameTextForPlayer(playerid,"~g~Voce esta no X1",5000,5);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid,100);
//Outras funзхes que queira
kQuantidade += 1;
kX1[ playerid ] = true;
return true;
}
OnPlayerDeath:
PHP код:
if( kX1[ playerid ] == true )
{
kX1[ playerid ] = false;
kX1[ killerid ] = false;
GetPlayerName( playerid, kMorreu, sizeof( kMorreu ) );
GetPlayerName( playerid, kMatou, sizeof( kMatou ) );
format( sStr, sizeof( sStr ), "Jogador(a) %s ganhou ao jogador(a) %s no x1", kMatou, kMorreu );
SendClientMessageToAll( -1, sStr );
kQuantidade = 0;
}
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando -
Ricop522 - 29.05.2011
https://sampforum.blast.hk/showthread.php?tid=258046&page=2
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando -
Macintosh - 29.05.2011
http://forum.sa-mp.com/showthread.ph...t=duas+pessoas
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando -
adailson - 21.10.2013
https://sampforum.blast.hk/showthread.php?tid=198691
Ta ai mano esse tutorial vai te ajudar!
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando -
N3XTMapper - 21.10.2013
afs, pa de ouro
Re: [AJUDA]Apenas 2 Players Fazer o Mesmo Comando -
bruxo00 - 21.10.2013
Nгo percebo onde estas pessoas acham estes tуpicos...