Help autofix command
#1

Hello, I am trying to execute the / autofix command that automatically repairs the vehicles without having to type it again, then I leave the code.

What I need is to see and optimize it in the best way so that it does not cause lag, what would be the best option? I listen to comments and / or codes, thank you.

PHP код:
new AutoFix[MAX_PLAYERS];
public 
OnPlayerUpdate(playerid)
{
if(
AutoFix[playerid] == && IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
}
return 
1;
}
CMD:autofix(playerid,params[])
{
       if (
AutoFix[playerid] == 0)
    {
        
AutoFix[playerid] = 1;
    }
    else if (
AutoFix[playerid] == 1)
    {
        
AutoFix[playerid] = 0;
    }
    return 
1;

Reply


Messages In This Thread
Help autofix command - by Fpwn - 11.10.2017, 06:29
Re: Help autofix command - by Kane - 11.10.2017, 07:04
Re: Help autofix command - by raydx - 11.10.2017, 07:54
Re: Help autofix command - by kAn3 - 11.10.2017, 11:53
Re: Help autofix command - by Kyle - 11.10.2017, 12:03
Re: Help autofix command - by AlamoTR - 11.10.2017, 12:07
Re: Help autofix command - by 0x88 - 11.10.2017, 12:17
Re: Help autofix command - by Kyle - 11.10.2017, 13:18
Re: Help autofix command - by FuNkYTheGreat - 11.10.2017, 13:34
Re: Help autofix command - by Fpwn - 11.10.2017, 17:03

Forum Jump:


Users browsing this thread: 2 Guest(s)