How would I go about making a toggle for unlimited car health
#3

pawn Код:
#define FILTERSCRIPT

#include < a_samp >
#include < zcmd >

#undef      MAX_PLAYERS
#define     MAX_PLAYERS     (50) // CHANGE TO THE MAX PLAYERS YOU WANT!

new
    bool: Toggle_Cargod[ MAX_PLAYERS ]
;

public OnPlayerConnect( playerid )
{
    Toggle_Cargod[ playerid ] = false;
    return 1;
}

public OnPlayerUpdate( playerid )
{
    if( Toggle_Cargod[ playerid ] && GetPlayerState( playerid ) == PLAYER_STATE_DRIVER )
    {
        SetVehicleHealth( GetPlayerVehicleID( playerid ), 95000 );
        RepairVehicle( GetPlayerVehicleID( playerid ) );
    }
    return 1;
}

CMD:cargod( playerid, params[ ] )
{
    if( !Toggle_Cargod[ playerid ] )
    {
        Toggle_Cargod[ playerid ] = true;
        SendClientMessage( playerid, -1, "Cargod is now on!" );
    }
    else
    {
        Toggle_Cargod[ playerid ] = false;
        SendClientMessage( playerid, -1, "Cargod is now off!" );
    }
    return 1;
}
Reply


Messages In This Thread
How would I go about making a toggle for unlimited car health - by ExtendedCarbon - 08.09.2013, 11:14
Re: How would I go about making a toggle for unlimited car health - by dusk - 08.09.2013, 11:21
Re: How would I go about making a toggle for unlimited car health - by Konstantinos - 08.09.2013, 11:22
Re: How would I go about making a toggle for unlimited car health - by Jstylezzz - 08.09.2013, 11:24
Re: How would I go about making a toggle for unlimited car health - by Weponz - 08.09.2013, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)