19.03.2012, 18:26
(
Последний раз редактировалось OleKristian95; 20.03.2012 в 19:16.
)
I have tried to make a command that lets you toggle vehicle auto-fix on and off but I can't make it work ... :/
This is how far I am right now:
When the car reaches 250hp I wan't it to automaticly repair itself so the hp changes to 1000.
Hope someone can help me fixing the code!
This is how far I am right now:
Код:
CMD:autofix(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Autofix] == 0) {
PlayerInfo[playerid][Autofix] = 1;
GetVehicleHealth(playerid,250) SetVehicleHealth(playerid,1000);
SendClientMessage(playerid,green,"Vehicle Auto-Fix Enabled. Do NOT use in fight.");
} else {
PlayerInfo[playerid][Autofix] = 0;
SendClientMessage(playerid,red,"Vehicle Auto-Fix Disabled");
SetPlayerHealth(playerid, 100);
} return GivePlayerWeapon(playerid,35,0);
}
Hope someone can help me fixing the code!

