SA-MP Forums Archive
Boot - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Boot (/showthread.php?tid=226256)



Boot - GarD - 15.02.2011

what wrong Signed /Open, and I only open but shut


pawn Код:
COMMAND:open( playerid )
{
    new
        vehid = GetClosestVehicle( playerid ),
        vid = GetPlayerVehicleID ( playerid  ),
        engine,lights,alarm,doors,bonnet,boot,objective,
        Boot[MAX_PLAYERS];
       
    if ( vehid < MAX_PLAYERS )
    {
        if ( !CheckPlayerDistanceToVehicle( 3.5, playerid, vehid ) ) SendClientMessage( playerid, COLOR_GREY, "   There is a vehicle near you." );
        else if ( !VehicleHasTrunk( GetVehicleModel( vehid ) ) )     SendClientMessage( playerid, COLOR_GREY, "   This vehicle has no trunk." );
        else
        {
            if(Boot[playerid] == 0)
            {
                GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
                ShowInfoText         ( playerid, "~g~Boot Open", 3000 );
                Boot[playerid] = 1;
            }
            else if(Boot[playerid] == 1)
            {
                GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
                SetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
                ShowInfoText         ( playerid, "~g~Boot Close", 3000 );
                Boot[playerid] = 0;
            }
        }
    }
    else
        SendClientMessage( playerid, COLOR_GREY, "   There is a vehicle near you." );

    return true;
}



Re: Boot - GarD - 15.02.2011

up up


Re: Boot - GarD - 17.02.2011

help plz