[Enable / Disable] Vehicle Auto-Fix (Not Working) |Easy & +1 Rep|
#1

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:

Код:
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);
}
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!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)