SA-MP Forums Archive
Opening window - 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)
+--- Thread: Opening window (/showthread.php?tid=577392)



Opening window - Jimmi - 11.06.2015

But how can I make on dialogue. And what can I open glass does not have to open all at once. Something like this:
http://i.imgur.com/DS8zVTV.png and when I close the pane: http://i.imgur.com/i9q64po.png
Код:
//========================================[CMD /WINDOWS]=====================================================//
CMD:window(playerid, params[])
{
        if(GetPlayerVehicleID(playerid) && GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)
        {
                SetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF);
        }
        return 1;

    }
//========================================[CMD /CLOSEWINDOWS]=================================================//
CMD:closewindow(playerid, params[])
   {
       if(GetPlayerVehicleID(playerid) && GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)
      {
               SetVehicleParamsCarWindows(GetPlayerVehicleID(playerid), VEHICLE_PARAMS_ON, VEHICLE_PARAMS_ON, VEHICLE_PARAMS_ON, VEHICLE_PARAMS_ON);
       }
       return 1;
   }



Re: Opening window - Huba - 11.06.2015

-1: Window state not set (generally closed, unless set explicitly to -1)
0: Open
1: Closed


Re: Opening window - Jimmi - 11.06.2015

And how the heck do I do?


Re: Opening window - Jimmi - 11.06.2015

Upppp


Re: Opening window - Jimmi - 11.06.2015

uppppp


Re: Opening window - Abagail - 11.06.2015

Basically, I believe the parameters match the window location based on a 4-seat vehicle:

1. 1st door
2. 2nd door

you get the pattern so it'd be:
pawn Код:
SetVehicleParamsCarWindows(vehicleid, VEHICLE_PARAMS_ON, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF, VEHICLE_PARAMS_OFF);
This opens only the first window which is also the window for the driver seat.