Vehicle Params
#1

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;
            }
        } 
Reply
#2

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

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
Reply
#4

Anyone? Thanks.
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)