09.03.2011, 17:46
Try that:
pawn Код:
public AutoR()
{
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
new Float:health, cid;
if(IsPlayerInAnyVehicle(i))
{
cid = GetPlayerVehicleID(i);
GetVehicleHealth(cid, health);
if (health < 300)
{
RepairVehicle(cid);
GameTextForPlayer(playerid, "Vehicle Repaired!",2000,5);
}
}
}
else
{
if(PlayerToPoint(2500, i, 563.4977,2079.7036,50.0636))//Full Lv
{
new Float:health, cid;
if(IsPlayerInAnyVehicle(i))
{
cid = GetPlayerVehicleID(i);
GetVehicleHealth(cid, health);
if (health < 300)
{
RepairVehicle(cid);
GameTextForPlayer(playerid, "Vehicle Repaired!",2000,5);
}
}
}
}
}
}
return 1;
}