11.02.2011, 06:22
pawn Код:
public AutoR()
{
for(new playerid=0; playerid<MAX_PLAYERS; playerid++) {
if(IsPlayerConnected(playerid)) {
new Float:health, cid;
if (IsPlayerInAnyVehicle(playerid)) {
if(IsPlayerAdmin(playerid)) { // RCON admin only
if(IsPlayerInRangeOfPoint(playerid, 15, Float:x, Float:y, Float:z)) { // 15 = The range of the points. Fill in your x, y, and z co-ords.
cid = GetPlayerVehicleID(playerid);
GetVehicleHealth(cid, health);
if (health < 300) {
SetVehicleHealth(cid,1000);
GameTextForPlayer(playerid, "Vehicul reparat!",2000,5);
}
}
}
}
}
}
return 1;
}