15.06.2011, 01:42
Hi frnds I have created Autofix script but there is no commands ok AutoFix but vehicle automatically get autofix can anyone create a command? (toggling command) /af, /autofix or anything u want...
for ex - /af (In-Game Text) AutoFix On /af (in-gametext) Autofix off... like that.. please...
can anyone make command /autofix (that players can toggles)
for ex - /af (In-Game Text) AutoFix On /af (in-gametext) Autofix off... like that.. please...
Код:
forward AutoFix();
Код:
//In GameModeInIt SetTimer("AutoFix", 1000, 1);
Код:
public AutoFix() { for(new playerid=0; playerid<MAX_PLAYERS; playerid++) { if(IsPlayerConnected(playerid)) { new Float:health, cid; if (IsPlayerInAnyVehicle(playerid)) { cid = GetPlayerVehicleID(playerid); GetVehicleHealth(cid, health); if (health < 950) { RepairVehicle(GetPlayerVehicleID(playerid)); } } } } return 1; }