SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/11/2019, 06:29 PM   #1
josh
Little Clucker
 
Join Date: Jul 2019
Posts: 28
Reputation: 0
Default Light alarm

I made a system when the player tries to enter the locked car will make a sound alarm, but the light does not work, only if is player entered the car will work the light of the car, How i can made light with alarm when the player tries to enter the locked car.
josh is offline   Reply With Quote
Old 14/11/2019, 06:39 PM   #2
NoteND
Big Clucker
 
Join Date: May 2016
Posts: 194
Reputation: 3
Default Re: Light alarm

Post code.
NoteND is offline   Reply With Quote
Old 14/11/2019, 07:10 PM   #3
josh
Little Clucker
 
Join Date: Jul 2019
Posts: 28
Reputation: 0
Default Re: Light alarm

Quote:
Originally Posted by NoteND View Post
Post code.


Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if (is_locked[vehicleid]) {
		new engine, lights, alarm, doors, bonnet, boot, objective;
		GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
		SetVehicleParamsEx(vehicleid, engine, 1, 1, VEHICLE_PARAMS_ON, bonnet, boot, objective);
	}
}
josh is offline   Reply With Quote
Old 14/11/2019, 07:58 PM   #4
Vizi10
Huge Clucker
 
Join Date: May 2017
Location: Iran
Posts: 223
Reputation: 8
Default Re: Light alarm

The lights not work when if the engine is off.
Vizi10 is offline   Reply With Quote
Old 14/11/2019, 10:12 PM   #5
josh
Little Clucker
 
Join Date: Jul 2019
Posts: 28
Reputation: 0
Default Re: Light alarm

Quote:
Originally Posted by Vizi10 View Post
The lights not work when if the engine is off.
Thank you.
But now i want after alarm is finished i want engine vehicle off.
josh is offline   Reply With Quote
Old 14/11/2019, 10:27 PM   #6
DomagojSellug
Huge Clucker
 
DomagojSellug's Avatar
 
Join Date: Sep 2016
Location: Croatia
Posts: 237
Reputation: 22
Default Re: Light alarm

I guess you should try to set a timer that will turn off the vehicle's engine after the alarm is off.
__________________

San Andreas Multiplayer server based off Counter Strike: Global Offensive.

Join us today!

DISCORD: discord.sa-go.info
WEBSITE: http://sa-go.info
SERVER IP: samp.sa-go.info
DomagojSellug is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NPCs stops for red light and drive at green light Julius95 Scripting Help 2 17/02/2014 02:57 PM
Light Bar> Any one know how to create a working Light Bar for car Txt. and dxt. Ali2627 Scripting Help 3 10/01/2014 04:12 AM
[BUG] Alarm scottyishere Help Archive 3 21/12/2010 12:08 PM
[FilterScript] [FS]Car Alarm Mikep Filterscripts 36 03/10/2010 08:38 PM
a car alarm?... FujiNNN Help Archive 7 30/03/2010 02:08 AM


All times are GMT. The time now is 02:49 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.