08.02.2011, 17:20
For the vehicle repair:
After that;
pawn Код:
public OnGameModeInit() {
SetTimer("repair", 500, 1);
return true;
}
pawn Код:
forward repair();
public repair() {
for(new i; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(IsPlayerInRangeOfPoint(i, rangehere, sumoX here, sumoY here, sumoZ here)) {
new vehicleid = GetPlayerVehicleID(i);
RepairVehicle(vehicleid);
}
}
}
return true;
}