[BUG] Vehicle Alarm not reset!
#1

When you set the vehicle alarm to 1, and wait untill it ends, it will still show it as 1 if you use GetVehicleParamsEx.
Reply
#2

Just set a timer..
Reply
#3

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
Just set a timer..
I know i'm not stupid, it's a bug.
Reply
#4

It's not a bug. You need to disable it yourself.
Reply
#5

Quote:
Originally Posted by Kalcor
Посмотреть сообщение
It's not a bug. You need to disable it yourself.
But it kinda is in some way, because if you check the vehicle alarm it says it's on but it isn't, so that's incorrect, so that's a bug.

So now we cannot just use the standard SetVehicleParamsEx but we have to use this?

pawn Код:
new Timer_VehAlarm[MAX_VEHICLES];
SetVehicleParamsEx_Fixed(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective)
{
    SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(alarm){
    KillTimer(Timer_VehAlarm[vehicleid]);
    Timer_VehAlarm[vehicleid] = SetTimerEx("DisableVehicleAlarm", 20000, false, "d", vehicleid);}
}

forward DisableVehicleAlarm(vehicleid);
public DisableVehicleAlarm(vehicleid)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(vehicleid, engine, lights, false, doors, bonnet, boot, objective);
}
Reply
#6

You got it, just no need to make the variable to hold the timer's ID - Unless you plan on destroying the timer for some reason.
Reply
#7

Quote:
Originally Posted by Grim_
Посмотреть сообщение
You got it, just no need to make the variable to hold the timer's ID - Unless you plan on destroying the timer for some reason.
Yes there is, because if they start the alarm again, it will stop too early.
Reply
#8

Quote:
Originally Posted by Grim_
Посмотреть сообщение
Unless you plan on destroying the timer for some reason.
The message you have entered is too short. Please lengthen your message to at least 8 characters
Reply
#9

Wtf? i just not turn it off and it stops itself:S (25 sec)
Reply
#10

Yes, it automatically turns off.

If you want it to continue playing, (I'm sure this will work) set a timer every 25 seconds re-applying the settings (Putting the alarm status to on again)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)