Simple "Fix Car" Command
#2

pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if( strcmp( "/fix", cmdtext, true, 4 ) == 0 ) {
        FixCar( playerid );
        return 1;
    }
    return 0;
}
// At The Bottom
stock FixCar( playerid )
{
    if( !IsPlayerInAnyVehicle( playerid ) ) return SendClientMessage( playerid, COLOR_YELLOW, "You need to be in a vehicle to fix it!" );
    if( GetPlayerState( playerid ) != 2 ) return SendClientMessage( playerid, COLOR_YELLOW, "You need to be the driver to fix your car" );
    SetVehicleHealth( GetPlayerVehicleID( playerid ), 1000.0 );
    SendClientMessage( playerid, COLOR_GREEN, "Car fixed!" );
    return 1;
}
Reply


Messages In This Thread
Simple "Fix Car" Command - by stormchaser206 - 18.01.2012, 19:11
Re: Simple "Fix Car" Command - by Konstantinos - 18.01.2012, 19:17
Re: Simple "Fix Car" Command - by stormchaser206 - 18.01.2012, 19:25
Re: Simple "Fix Car" Command - by Konstantinos - 18.01.2012, 19:27

Forum Jump:


Users browsing this thread: 1 Guest(s)