SA-MP Forums Archive
[Pedido]Cmd /congelar . - 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: [Pedido]Cmd /congelar . (/showthread.php?tid=267255)



[Pedido]Cmd /congelar . - akZ - 07.07.2011

Eu estou fazendo um filterscript de evento ja fiz quase tudo, mas a unica coisa que ta faltando sгo os comandos,
Код:
/eve congelar
e
Код:
/eve descongelar
, so os jogadores que estгo no evento ja tentei mas nгo consegui ¬¬ se puderem me ajudar ai .


Re: [Pedido]Cmd /congelar . - BlueRider - 07.07.2011

Quais sгo as variбveis que verifica se o jogador estб no evento ou nгo? Poste!


Re: [Pedido]Cmd /congelar . - RockFire - 07.07.2011

Pra um player
PHP код:
if(!strcmp(cmdtext,"/congelar",true))
{
    
TogglePlayerControllable(strval(cmdtext[11]),false);
    return 
true;

Pra todos do evento
PHP код:
if(!strcmp(cmdtext,"/congelar",true))
{
    for(new 
0GetMaxPlayers(); != j; ++i) {    
        if(
Variavel[i] == true) {
            
TogglePlayerControllable(i,false);
        }
    }
    return 
true;

Pra todos
PHP код:
if(!strcmp(cmdtext,"/congelar",true))
{
    for(new 
0GetMaxPlayers(); != j; ++i) {    
        
TogglePlayerControllable(i,false)
    }
    return 
true;




Re: [Pedido]Cmd /congelar . - Ricop522 - 07.07.2011

pawn Код:
if(!strcmp(cmd, "/congelar", true))
{
    for(new i = 0x0; i < MAX_PLAYERS; ++i) {
        if(evento[i] > 0) TogglePlayerControllable(i, 0);
    }
    return true;
}
if(!strcmp(cmd, "/descongelar", true))
{
    for(new i = 0x0; i < MAX_PLAYERS; ++i) {
        if(evento[i] > 0) TogglePlayerControllable(i, 1);
    }
    return true;
}



Re: [Pedido]Cmd /congelar . - Macintosh - 07.07.2011

Й pra os jogadores usarem o comando ou um admin? Se for admin manda sua define do sistema de administraзгo.


Re: [Pedido]Cmd /congelar . - akZ - 07.07.2011

define de admin
pawn Код:
#define eventoz
verifica se o player esta no evento
pawn Код:
new bool:IsPlayerInEvento[MAX_PLAYERS];



Re: [Pedido]Cmd /congelar . - Transferencia - 07.07.2011

pawn Код:
if(!strcmp(cmd, "/congelar", true))
{
    for(new i = 0x0; i < MAX_PLAYERS; ++i) {
    if(IsPlayerInEvento[i] > 0) TogglePlayerControllable(i, 0);
    }
    return true;
}
if(!strcmp(cmd, "/descongelar", true))
{
    for(new i = 0x0; i < MAX_PLAYERS; ++i) {
    if(IsPlayerInEvento[i] > 0) TogglePlayerControllable(i, 1);
    }
    return true;
}
Agora so adicionar o comparador if do seu sistema de administraзao.


Re: [Pedido]Cmd /congelar . - akZ - 07.07.2011

valeu ai agora deu so tive que fazer alguns ajuste


Re: [Pedido]Cmd /congelar . - Ricop522 - 07.07.2011

Se ajudei da reputaзгo ;]