• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Help me with this cmd
#2
Try this

PHP Code:
new TimeFix[MAX_PLAYERS];

CMD:godcar(playeridparams[])
{
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playeridCOLOR_RED"You need to be the driver!");
    if(Active[playerid] == 1)
    {
        SendClientMessage(playeridCOLOR_RED"Godcar already enabled!");
        return 1;
    }
    TimeFix[playerid] = SetTimerEx("Fix"200true"i"playerid);
    SendClientMessage(playeridCOLOR_WHITE"Godcar enabled!");
    Active[playerid] = 1;
    return 1;
}

forward Fix(playerid);

public 
Fix(playerid)
{
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
    if(Active[playerid] != 1) return 0;
    
    
// Flatten tires
    tires(playerid"");

    // Add other self-repair actions if needed
    
    
return 1;
}

CMD:tires(playeridparams[])
{
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playeridCOLOR_RED"You need to be the driver!");

    new panelsdoorslightstires;
    new vehicleid GetPlayerVehicleID(playerid);
    GetVehicleDamageStatus(vehicleidpanelsdoorslightstires);
    UpdateVehicleDamageStatus(vehicleidpanelsdoorslights5);

    return 1;

  Reply


Messages In This Thread
Help me with this cmd - by julees - 2024-03-10, 02:05 AM
RE: Help me with this cmd - by N0FeaR - 2024-03-10, 02:08 AM
RE: Help me with this cmd - by Goldenman - 2024-04-04, 08:50 PM

Forum Jump: