11.03.2013, 17:46
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;
}