Lights on/off with a key
#1

Hey dudes, i've scripted a little part of my gamemode in order to put on lights with a key:

if((newkeys == KEY_SUBMISSION) || (newkeys & KEY_SPRINT) && (newkeys & KEY_SUBMISSION) || (newkeys & KEY_UP) && (newkeys & KEY_SUBMISSION) || (newkeys & KEY_DOWN) && (newkeys & KEY_SUBMISSION) || (newkeys & KEY_WALK) && (newkeys & KEY_SUBMISSION) || (newkeys & KEY_LEFT) && (newkeys & KEY_SUBMISSION) || (newkeys & KEY_RIGHT) && (newkeys & KEY_SUBMISSION))
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);

if(PharesAllumer[vehicleid] == 0)
{
SetVehicleParamsEx(vehicleid,engine,VEHICLE_PARAMS _ON,alarm,doors,bonnet,boot,objective);
PharesAllumer[vehicleid] = 1;
}

}
}
}
}

But how to do, in order to put off the lights with the same key ?
Reply


Messages In This Thread
Lights on/off with a key [Resolved] - by Arpatos - 28.02.2013, 12:23
Re: Lights on/off with a key - by Luis- - 28.02.2013, 12:27
Re: Lights on/off with a key - by =WoR=Varth - 28.02.2013, 12:44
Re: Lights on/off with a key - by Arpatos - 28.02.2013, 12:47
Re: Lights on/off with a key - by =WoR=Varth - 28.02.2013, 12:53
Re: Lights on/off with a key - by Arpatos - 28.02.2013, 12:58
Re: Lights on/off with a key - by Vince - 28.02.2013, 13:20
Re: Lights on/off with a key - by Arpatos - 28.02.2013, 13:32
Re: Lights on/off with a key - by Arpatos - 28.02.2013, 14:54
Re: Lights on/off with a key - by Arpatos - 28.02.2013, 16:30

Forum Jump:


Users browsing this thread: 1 Guest(s)