SA-MP Forums Archive
[Ajuda] /kick e /ban - 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] /kick e /ban (/showthread.php?tid=396318)



/kick e /ban - SkullFire - 30.11.2012

Pessoal, eu estava procurando comandos /kick e /ban para colocar no meu gm.

Por exemplo e de /ban :

Код:
CMD:ban(playerid, params[])
{
    new string[256], NomeP[MAX_PLAYER_NAME], Texto[128];
    if(PlayerInfo[playerid][pLevel] < 1) return SendClientMessage(playerid,Vermelho,"[ERRO]: Vocк nгo й admin!");
    if(sscanf(params,"us[158]",ID,Texto))   return SendClientMessage(playerid,Vermelho,"[USE]: /ban [id] [motivo]");
    if(!IsPlayerConnected(ID))return SendClientMessage(playerid,Vermelho,"[ERRO]: Jogador Nгo Conectado!");
    GetPlayerName(playerid,NomeP,MAX_PLAYER_NAME);
    GetPlayerName(ID,NomeID,MAX_PLAYER_NAME);
    gettime(Horas,Minutos,Segundos);
    getdate(Ano,Mes,Dia);
    format(string, sizeof(string),"O(a)Administrador '%s' Baniu '%s' (Motivo: %s ) [Data: %d/%d/%d] [Hora: %d:%02d:%02d]",NomeP,NomeID,Texto,Dia,Mes,Ano,Horas,Minutos,Segundos);
    SendClientMessageToAll(Cinza,string);
    PlayerInfo[ID][pBanido] = 1;
    GameTextForPlayer(ID, "~r~VOCE FOI BANIDO!", 5000, 3);
    Ban(ID);
    return true;
}
Olha o tanto de erro que da .
Код:
C:\Users\Gisele\Desktop\s\gm\gamemodes\meugm.pwn(103) : warning 217: loose indentation
C:\Users\Gisele\Desktop\s\gm\gamemodes\meugm.pwn(111) : warning 217: loose indentation
C:\Users\Gisele\Desktop\s\gm\gamemodes\meugm.pwn(113) : warning 217: loose indentation
C:\Users\Gisele\Desktop\s\gm\gamemodes\meugm.pwn(113) : error 029: invalid expression, assumed zero
C:\Users\Gisele\Desktop\s\gm\gamemodes\meugm.pwn(113) : error 017: undefined symbol "cmd_ban"
C:\Users\Gisele\Desktop\s\gm\gamemodes\meugm.pwn(113) : error 029: invalid expression, assumed zero
C:\Users\Gisele\Desktop\s\gm\gamemodes\meugm.pwn(113) : fatal error 107: too many error messages on one line
Todo comando que eu coloco em zcmd da erro . Tem como me ajudar ?


Re: /kick e /ban - ViniBorn - 30.11.2012

loose indentation vocк resolve alinhando corretamente seu cуdigo.

Coloque este comando 'solto' pelo GameMode


Re: /kick e /ban - Saw_BR - 30.11.2012

Botou a include?
caso seu GM seja de outra forma, use o mesmo.


Re : /kick e /ban - SkullFire - 30.11.2012

sim eu coloquei a include zcmd


Re: /kick e /ban - Rodney Francalim - 30.11.2012

Nгo coloque os comandos dentro de alguma public. Deixe ele fora. Ponha-os entre 2 public. Exemplo:
pawn Код:
public OnPlayerUpdate(playerid)
{
    // ...
    return 1;
}

CMD:kick(playerid, params[])
{
    // ...
    return 1;
}

CMD:ban(playerid, params[])
{
    // ...
    return 1;
}

public OnPlayerLogin(playerid)
{
    // ...
    return 1;
}