Removing a part of this
#1

Okay well I have a command that allows admins to fix a car
Код:
command(afix, playerid, params[])
{
	#pragma unused params
	if(Player[playerid][AdminLevel] >= 1)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
		    if(Player[playerid][CarModDelay] == 0)
			{
			    if(GetPlayerSpeed(playerid, 0) == 0)
			    {
				    RepairVehicle(GetPlayerVehicleID(playerid));
				    SendClientMessage(playerid, WHITE, "You have fixed your vehicle.");
				    Player[playerid][CarModDelay] = 1;
			    }
			    else
			    {
			        SendClientMessage(playerid, WHITE, "You must stop your vehicle first.");
			    }
		    }
		    else
		    {
		        SendClientMessage(playerid, WHITE, "Please wait your reload time (60 seconds).");
		    }
		}
	}
	return 1;
}
How would I make it so that admins can do it without a time limit, or at any speed
Reply
#2

pawn Код:
command(afix, playerid, params[])
{
    #pragma unused params
    if(Player[playerid][AdminLevel] >= 1)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
             RepairVehicle(GetPlayerVehicleID(playerid));
             SendClientMessage(playerid, WHITE, "You have fixed your vehicle.");
        }
    }
    return 1;
}
Try like this.
Reply
#3

Works thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)