їMe ayudan con este problema por favor?
#1

Buenas, estoy intentando hacer un mini anti-cheat, y al momento de compilar me saltan warnings y demбs, les dejo el cуdigo completo y abajo los warning.
Tambiйn me gustarнa que me dijesen si funcionarнa bien asн como estб.
pawn Код:
new Float:Vida[MAX_PLAYERS];
new Float:Chaleco[MAX_PLAYERS];
new Dinero[MAX_PLAYERS];

stock SetPlayerHealthEx(playerid, Float:health)
{
    SetPlayerHealth(playerid, health);
    Vida[playerid] = health;
    return 1;
}

stock GivePlayerMoneyEx(playerid, money)
{
    GivePlayerMoney(playerid, money);
    Dinero[playerid] = GetPlayerMoney(playerid)+money;
    return 1;
}

stock SetPlayerArmourEx(playerid, Float:armour)
{
    SetPlayerArmour(playerid, armour);
    Chaleco[playerid] = armour;
    return 1;
}

stock ResetDinero(playerid)
{
    new sasportodoelculo;
    sasportodoelculo = Dinero[playerid];
    Dinero[playerid] = 0;
    ResetPlayerMoney(playerid);
    GivePlayerMoneyEx(playerid, sasportodoelculo);
    return 1;
}

stock VerVida(playerid)
{
    return Vida[playerid]; // Warning acб.
}

stock VerChaleco(playerid)
{
    return Chaleco[playerid]; // Warning acб.
}

stock VerDinero(playerid)
{
    return Dinero[playerid];
}

forward DetectarCheats();
public DetectarCheats()
{
    foreach(Player, i)
    {
        new asd[128], Float:vidaa = GetPlayerHealth(i), Float:chalecoo = GetPlayerArmour(i), dineroo = GetPlayerMoney(i);
        if(vidaa > VerVida(i))
        {
            format(asd, sizeof(asd), "{00C3EA}» {FFFFFF}El usuario {FF0000}%s {FFFFFF}fue baneado por el anti-cheat. Razуn: {FF0000}Cheat de vida.",NombreJugador(i));
            SendClientMessageToAll(-1, asd);
            Ban(i);
        }
        if(chalecoo > VerChaleco(i))
        {
            format(asd, sizeof(asd), "{00C3EA}» {FFFFFF}El usuario {FF0000}%s {FFFFFF}fue baneado por el anti-cheat. Razуn: {FF0000}Cheat de chaleco.",NombreJugador(i));
            SendClientMessageToAll(-1, asd);
            Ban(i);
        }
        if(dineroo > VerDinero(i))
        {
            ResetDinero(i);
        }
    }
}

SetTimer("DetectarCheats",1000,true); // Ya saben dуnde puse esto.
Код:
C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ServerGM.pwn(158) : warning 213: tag mismatch
C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ServerGM.pwn(163) : warning 213: tag mismatch
C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ServerGM.pwn(191) : warning 202: number of arguments does not match definition
C:\Users\Equipo\Desktop\Servidor samp\gamemodes\ServerGM.pwn(191) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

PHP код:
stock Float:VerVida(playerid)
{
    return 
Vida[playerid]; // Warning acб.
}

stock Float:VerChaleco(playerid)
{
    return 
Chaleco[playerid]; // Warning acб.

y GetPlayerHealth, GetPlayerArmour no se usa asн, al menos que lo tengas hookeado
Reply
#3

Gracias :3
їAsн?
pawn Код:
GetPlayerHealth(i, vidaa);
GetPlayerArmour(i, chalecoo);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)