Someone please help me!
#1

Okay, basically I made this up, I know its written wrong, but someone MUST know where Im trying to get!!

if the lights are on I want 'key_jump' be able to turn them off same goes for the other way round. Can anyone correct this code? If you could that would be awesome

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if(newkeys == KEY_FIRE)
   {
		if ((GetVehicleParamsEx) == vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
	 new vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
            else
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
       }
}
Reply
#2

Код:
new LightsSTATE; //top of script

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if(newkeys == KEY_FIRE)
   {
            new vid = GetPlayerVehicleID(playerid);
            if(LightsSTATE == 0)
            {
                   GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                   SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
                   LightsSTATE = 1;
            }
            else
            {
                   GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                   SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
                   LightsSTATE = 0;           
            }       
    }
}
Reply
#3

Dude! you are awesome! thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)