[Ajuda] ModCleo
#4

pawn Код:
/*               O FIM DOS MOD CLEO DE REPARAR CARRO                          */

#include a_samp

new
    Float:VIDA[MAX_VEHICLES],
    Atu[MAX_PLAYERS]
;

public OnFilterScriptInit() {
    for(new h = 0; h < MAX_VEHICLES; h++) {
         VIDA[h] = 1000.0;
    }
    return 1;
}

public OnFilterScriptExit() {
    for(new h = 0; h < MAX_VEHICLES; h++) {
        VIDA[h] = 0.0;
    }
    return 1;
}

public OnPlayerConnect(playerid) {
    Atu[playerid] = SetTimerEx("Veiculo", 1000, 0, "i", playerid);
    return 1;
}

public OnPlayerUpdate(playerid) {
    if(IsPlayerInAnyVehicle(playerid)) {
        KillTimer(Atu[playerid]);
        new
            Float:VDon,
            vehicleid = GetPlayerVehicleID(playerid)
        ;
        GetVehicleHealth(vehicleid, VDon); VIDA[vehicleid] = VDon;
        Atu[playerid] = SetTimerEx("Veiculo", 1000, 0, "i", vehicleid);
    }
    return 1;
}

Veiculo(playerid); public Veiculo(playerid) {
    if(IsPlayerInAnyVehicle(playerid)) {
        new
            Float:VDon,
            vehicleid = GetPlayerVehicleID(playerid)
        ;
        GetVehicleHealth(vehicleid, VDon);
        if(VDon != VIDA[vehicleid]) {
            SendClientMessage(playerid, -1, " Acusado de Mod Cleo!");
            Kick(playerid);
        }
    }
    return 1;
}
Alterei o igualamento em inteiro para ponto flutuante
Reply


Messages In This Thread
ModCleo - by Don_Speed - 11.03.2013, 17:33
Re: ModCleo - by @Riichard - 11.03.2013, 17:37
Re: ModCleo - by Delete_ - 11.03.2013, 17:46
Re: ModCleo - by Dwayne-Pheonix - 11.03.2013, 17:46
Re: ModCleo - by @Riichard - 11.03.2013, 17:48
Re: ModCleo - by Dwayne-Pheonix - 11.03.2013, 17:55
Re: ModCleo - by mau.tito - 11.03.2013, 18:13
Re: ModCleo - by @Riichard - 11.03.2013, 18:14
Re: ModCleo - by Don_Speed - 11.03.2013, 19:58

Forum Jump:


Users browsing this thread: 1 Guest(s)