SSGamers - 7 Anos online por você.

#SSGamers - A Comunidade que mais crescer no brasil!
SSGames - Servidores online de qualidade - Inscreva-se Ja! é entre para nossa comunidade! - Ouça nossa web radio -Veja nossas novidades - Participe dos nossos setores de jogos online - Parcerias aberta fale já com um administrador.

Vercombate pronto ajuda

Compartilhe
avatar
axtlon
--> Postador Iniciante
--> Postador Iniciante

Mensagens : 26
Data de inscrição : 22/12/2015

Vercombate pronto ajuda

Mensagem por axtlon em Sex 3 Nov 2017 - 0:40

Esse codigo e de /vercombates Alguem pode corrigir ele ta dando erro na minha GM versão beta play Facil...

//###################################################################################//
//##################################[Ver Combates]###################################//
//###################################################################################//

#include
#include
#include
#include
#include
#pragma disablerecursion

//############################################################################################//
//#######################################[Vars/Defines]#######################################//
//############################################################################################//

#define TEMPO_RESETAR 120
#define MAX_COMBATES 50

new UltimoCombate[MAX_PLAYERS][MAX_PLAYERS],
varGlobal[2048],
combates;

//############################################################################################//
//#########################################[CallBacks]########################################//
//############################################################################################//

public OnFilterScriptInit()
{
for(new i; i < MAX_PLAYERS; i ++) 
{
UltimoCombate[i][i] = -1;
}
varGlobal[0] = EOS;
return true;
}

public OnFilterScriptExit()
{
return true;
}

public OnPlayerConnect(playerid)
{
for(new i; i < MAX_PLAYERS; i ++) 
{
UltimoCombate[playerid][i] = -1;
UltimoCombate[i][playerid] = -1;
}
return true;
}

public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(UltimoCombate[playerid][issuerid]-gettime() <= 0)
{
new Hora, Minuto, Segundo;
GetTimeFix(Hora, Minuto, Segundo);
UltimoCombate[playerid][issuerid] = gettime()+TEMPO_RESETAR;
if(combates >= MAX_COMBATES)
varGlobal[0] = EOS;

strcat(varGlobal, fmat_return("[%02d:%02d:%02d] %s iniciou um combate contra %s\n", Hora, Minuto, Segundo, PlayerName(playerid), PlayerName(issuerid)));
}
}
return true;
}

public OnPlayerDeath(playerid, killerid, reason)
{
for(new i; i < MAX_PLAYERS; i ++) 
{
UltimoCombate[playerid][i] = -1;
UltimoCombate[i][playerid] = -1;
}
return true;
}

public OnPlayerDisconnect(playerid, reason)
{
for(new i; i < MAX_PLAYERS; i ++) 
{
UltimoCombate[playerid][i] = -1;
UltimoCombate[i][playerid] = -1;
}
return true;
}

//############################################################################################//
//##########################################[Comandos]########################################//
//############################################################################################//

CMD:vercombates(playerid)
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Combates Rescentes", varGlobal, "Fechar", "");
return true;
}

stock fmat_return(const fmat[], va_args<>)
{
    new str[300];
    va_format(str, sizeof(str), fmat, va_start<1>);
    return str;
}

stock PlayerName(playerid)
{
    static nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome, sizeof(nome));
    return nome;
}

new timeFixer = 0;
stock GetTimeFix(&h, &m, &s)
{
    gettime(h, m, s);

    h += timeFixer;
    if(h > 23)
        h -= 24;
    if(h < 0)
        h += 24;
    return 1;
}
avatar
WanDThuG
--> Postador Fanático
--> Postador Fanático

Mensagens : 125
Data de inscrição : 02/03/2014

Re: Vercombate pronto ajuda

Mensagem por WanDThuG em Sex 3 Nov 2017 - 3:11

Qual erro?
avatar
axtlon
--> Postador Iniciante
--> Postador Iniciante

Mensagens : 26
Data de inscrição : 22/12/2015

Re: Vercombate pronto ajuda

Mensagem por axtlon em Sex 3 Nov 2017 - 5:34

C:\Users\Usuario\Desktop\Gamemode\gamemodes\BPM.pwn(105103) : error 035: argument type mismatch (argument 2)
C:\Users\Usuario\Desktop\Gamemode\gamemodes\BPM.pwn(119547) : error 001: expected token: ")", but found "<"
C:\Users\Usuario\Desktop\Gamemode\gamemodes\BPM.pwn(119547) : error 085: no states are defined for symbol "fmat_return"
C:\Users\Usuario\Desktop\Gamemode\gamemodes\BPM.pwn(119547) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\Gamemode\gamemodes\BPM.pwn(119547) : fatal error 107: too many error messages on one line

Linha 105103 :

strcat(varGlobal, fmat_return("[%02d:%02d:%02d] %s iniciou um combate contra %s\n", Hora, Minuto, Segundo, PlayerName(playerid), PlayerName(issuerid)));

Linha 119547 :

stock fmat_return(const fmat[], va_args<>)

    Data/hora atual: Dom 19 Nov 2017 - 22:13

    Copyright © SSGamers 2011/2017 - DIREITOS RESERVADOS PARA COMUNIDADE SSGAMERS LTDA.