SA-MP Forums Archive
Vehicle Params - 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: Vehicle Params (/showthread.php?tid=502020)



Vehicle Params - Carxi - 21.03.2014

I've a problem whit the Lights Params.
This is my code. When i type /v lights does not turn on nothing.
PHP код:
if(strcmp(tmp,"luci",true) == 0)
    {
        if(
IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new 
vehicleid GetPlayerVehicleID(playerid);
            new 
param[7];
            
GetVehicleParamsEx(vehicleid,param[0],param[1],param[2],param[3],param[4],param[5],param[6]);
            if(
param[1])
            {
                
SetVehicleParamsEx(vehicleid,param[0],0,param[2],param[3],param[4],param[5],param[6]);
                
//SendEmote(playerid,"turns the lights in their vehicle off.");
                
return 1;
            }
            else
            {
                
SetVehicleParamsEx(vehicleid,param[0],1,param[2],param[3],param[4],param[5],param[6]);
                
//SendEmote(playerid,"turns the lights in their vehicle on.");
                
return 1;
            }
        } 



Re: Vehicle Params - Sascha - 21.03.2014

That might be because following to your command you should write "luci" and not "lights"


Re: Vehicle Params - Carxi - 22.03.2014

Quote:
Originally Posted by Sascha
Посмотреть сообщение
That might be because following to your command you should write "luci" and not "lights"
Alright, now works but the lights turn on when i leave from the vehicle


Re: Vehicle Params - Carxi - 22.03.2014

Anyone? Thanks.


Re: Vehicle Params - Delta 4 - 24.03.2014

If they are off, they turn on when u exit it?