SA-MP Forums Archive
[Ajuda] maximo de players por teleporte - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] maximo de players por teleporte (/showthread.php?tid=384951)



maximo de players por teleporte - Lucas-Fc - 13.10.2012

como faзo isso ?

tipo, quando um player teleportar pra algum local, so ter no maximo 2 pessoas la. ai se alguem quiser entrar depois, fala q ta lotado .. como isso ?


Re: maximo de players por teleporte - Jason` - 13.10.2012

PHP код:
new variavel;

// quando entrar no teleporte
variavel++;

// quando sair do teleporte
variavel--;

// verificaзгo 
if(== variavel) return SendClientMessage(playerid, -1"Mбximo 2 pessoas."); 



Re: maximo de players por teleporte - Lucas-Fc - 13.10.2012

¬¬

nгo ajudou nй cara '-' sou iniciante '-


Re: maximo de players por teleporte - ForT - 13.10.2012

tipo assim
PHP код:
new Entrados;//variavel valor 0



//comando do teleporte
CMD:teleporte(playerid)
{
     if(
Entrados 2)return SendClientMessage(playerid,-1"Ja tem mais de 2 lб!!");//checa se tem mais de 2 players
    
SetPlayerPos(playerid1.0001.0001.000);
    
Entrados++;//aumenta a cada player que digitar o cmd
    
return 1;




Re: maximo de players por teleporte - Jason` - 13.10.2012

Quote:
Originally Posted by Lucas-Fc
Посмотреть сообщение
¬¬

nгo ajudou nй cara '-' sou iniciante '-
Entгo й melhor vocк procurar um gerador de cуdigos prontos.