SA-MP Forums Archive
[Help]When I leave the vehicle turns on the light - 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: [Help]When I leave the vehicle turns on the light (/showthread.php?tid=587918)



[Help]When I leave the vehicle turns on the light - Miguelito9801 - 03.09.2015

when I leave the vehicle turns on the light and entering the vehicle when the light goes off
because they believe it?
help me please


Re: [Help]When I leave the vehicle turns on the light - Bomber07 - 03.09.2015

just in your script ?


Re: [Help]When I leave the vehicle turns on the light - Miguelito9801 - 04.09.2015

in commands
PHP код:
CMD:luz(playeridparams[])
{
    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 110,0,0,0,0);
   
// (vehicleid, engine, lights, alarm, doors, bonnet, boot, objective)
    //GetPlayerVehicleID
    
return 1;
}
CMD:noluz(playeridparams[])
{
    
SetVehicleParamsEx(GetPlayerVehicleID(playerid), 100,0,0,0,0);
   
// (vehicleid, engine, lights, alarm, doors, bonnet, boot, objective)
    //GetPlayerVehicleID
    
return 1;

I have only these commands


Re : [Help]When I leave the vehicle turns on the light - KillerDVX - 04.09.2015

https://sampwiki.blast.hk/wiki/SetVehicleParamsEx

-KillerDVX.



Re: Re : [Help]When I leave the vehicle turns on the light - Miguelito9801 - 04.09.2015

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
that's what I noted above


Re: [Help]When I leave the vehicle turns on the light - mirou123 - 04.09.2015

What do you have under OnPlayerExitVehicle, OnPlayerEnterVehicle and OnPlayerStateChange?


Re: [Help]When I leave the vehicle turns on the light - Miguelito9801 - 04.09.2015

I don't have these callbacks OnPlayerExitVehicle and OnPlayerEnterVehicle
In OnPlayerStateChange
PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
        if(
newstate == PLAYER_STATE_DRIVER)
        {
                for(new 
i15i++)
                        
TextDrawShowForPlayer(playeridTextDrawsVelocimetro[TDSpeedClock][i]);
                for(new 
i4i++)
                        
TextDrawsd[playerid][i] = TextDrawCreate(555.0402.0"~b~.");
        }
        else
        {
                
TextDrawHideForPlayer(playeridKmH);
                for(new 
i4i++)
                    
TextDrawHideForPlayer(playeridTextDrawsd[playerid][i]);
                for(new 
i15i++)
                    
TextDrawHideForPlayer(playeridTextDrawsVelocimetro[TDSpeedClock][i]);
                        
        }
        return 
1;




Re: [Help]When I leave the vehicle turns on the light - GXLZPGX - 04.09.2015

The cmd functions aren't the problem, mind showing us where you use the command functions?


Re: [Help]When I leave the vehicle turns on the light - mirou123 - 04.09.2015

Search for SetVehicleParamsEx and whenever you find it post the block here.


Re: [Help]When I leave the vehicle turns on the light - Miguelito9801 - 04.09.2015

but I have nothing more to do with the condition of the vehicle had done searching this function SetVehicleParamsEx and put into practice