SetVehicleParamsEx Problem
#1

When i lock my vehicle, and do respawn on him (example park him and respawn), te doors are unlocked when the vehicle spawned... Please help

Код:
public OnVehicleSpawn(vehicleid)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    if(IsAOwnedVehicle(vehicleid))
    {
        SetVehicleComponents(vehicleid);
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        if(VehicleInfo[vehicleid][vLocked] == 1) SetVehicleParamsEx(vehicleid, 0, 0, alarm, 1, bonnet, boot, objective);
        else SetVehicleParamsEx(vehicleid, 0, 0, alarm, 0, bonnet, boot, objective);
        ChangeVehicleColor(vehicleid, VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2]);
		vEngine[vehicleid] = 0;
	}
	else
	{
	    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
	    SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective);
	    vEngine[vehicleid] = 0;
	}
	return 1;
}
Reply
#2

Fix Your English , You Are Lucky that me understant you.


Do It


Quote:

public OnVehicleSpawn(vehicleid)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
if(IsAOwnedVehicle(vehicleid))
{
SetVehicleComponents(vehicleid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(VehicleInfo[vehicleid][Locked] == true) SetVehicleParamsEx(vehicleid, 0, 0, Lock 1, bonnet, boot, objective);
else SetVehicleParamsEx(vehicleid, 0, 0, alarm, 0, bonnet, boot, objective);
ChangeVehicleColor(vehicleid, VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2]);
vEngine[vehicleid] = 0;
}
else
{
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective);
vEngine[vehicleid] = 0;
}
return 1;
}

i think its will work with you.

Please +REP Me if me helped you
Reply
#3

Try this

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    if(IsAOwnedVehicle(vehicleid))
    {
        SetVehicleComponents(vehicleid);
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        if(VehicleInfo[vehicleid][vLocked] == 1) SetVehicleParamsEx(vehicleid, 0, 0, alarm, 1, bonnet, boot, objective);
        SetVehicleParamsEx(vehicleid, 0, 0, alarm, 0, bonnet, boot, objective);
        ChangeVehicleColor(vehicleid, VehicleInfo[vehicleid][vColor1], VehicleInfo[vehicleid][vColor2]);
        vEngine[vehicleid] = 0;
    }
    else if(!IsAOwnedVehicle(vehicleid))
    {
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(vehicleid, 0, 0, alarm, doors, bonnet, boot, objective);
        vEngine[vehicleid] = 0;
    }
    return 1;
}
Reply
#4

if it working to you then REP+ Me or REP+ Diego too

Good Luck
Reply
#5

Not working for both.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)