08.09.2013, 11:22
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;
}