Always running engine + lights - 
Igorek -  26.03.2011
 
With this simple script is all the cars on your server will be wound with the lights on.
PHP код:
/*
 ======================================================
|[FS]always running engine + lights by [omegakai]Games |
 ======================================================
*/
#include <a_samp>
new engine,lights,alarm,doors,bonnet,boot,objective;
forward inclusion();
public OnFilterScriptInit()
{
    SetTimer("inclusion",5000,1);
    return 1;
}
public inclusion()
{
    for(new i=0; i<1000; i++) //1000-the number of cars on the server
    {
        GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(i,VEHICLE_PARAMS_ON,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
    }
    return 1;
} 
 
Re: Always running engine + lights - 
wheelman_WM -  26.03.2011
Hm Good
Re: Always running engine + lights - 
Abinesh™ -  26.03.2011
simply gud
Re: Always running engine + lights - 
Den_Deluxe -  26.03.2011
Nice Job!
Re: Always running engine + lights - 
Dream™ -  26.03.2011
Great job
Re: Always running engine + lights - 
wups -  26.03.2011
Quote:
| 
					Originally Posted by Las Venturas CNR  
pawn Код: /*======================================================
 |[FS]always running engine + lights by [omegakai]Games |
 ======================================================
 */
 
 #include <a_samp>
 
 new engine,lights,alarm,doors,bonnet,boot,objective;
 
 forward inclusion();
 
 public OnFilterScriptInit()
 {
 SetTimer("inclusion",5000,1);
 return 1;
 }
 
 public inclusion()
 {
 for(new i=0; i<1000; i++) //1000-the number of cars on the server
 {
 if(IsPlayerInAnyVehicle(i))
 {
 if(GetPlayerState(i) == PLAYER_STATE_DRIVER))
 {
 new vehicle;
 vehicle = GetPlayerVehicleID(playerid);
 GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
 SetVehicleParamsEx(vehicle,VEHICLE_PARAMS_ON,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
 }
 }
 }
 return 1;
 }
 | 
 And that's a fail.
Re: Always running engine + lights - 
wups -  26.03.2011
Quote:
| 
					Originally Posted by Las Venturas CNR  Fixed, lol.... | 
 But in your code it won't be allways running. Only when someone is in the vehicle.
Re: Always running engine + lights - 
Vlad_Dubonos -  26.03.2011
Good
Re: Always running engine + lights - 
Igorek -  26.03.2011
Thank you all.
Re: Always running engine + lights - 
Igorek -  27.03.2011
more comments please
Re: Always running engine + lights - 
DRIFT_HUNTER -  27.03.2011
Well i dont like that way...
I think you just can set vehicle params at vehicle spawn or on vehicle stream in (i recommend to do it on vehicle spawn)
Respuesta: Always running engine + lights - 
SuperMarioRol -  29.04.2011
I dont like it.
A timer for 5 seconds isnt good.
Re: Always running engine + lights - 
Vince -  29.04.2011
Quote:
| 
					Originally Posted by DRIFT_HUNTER  Well i dont like that way...
 I think you just can set vehicle params at vehicle spawn or on vehicle stream in (i recommend to do it on vehicle spawn)
 | 
 Exactly. This script is pretty useless if you ask me. Engines are automatically started when a player enters a vehicle and lights are also automatically turned on when it gets night. Lights aren't visible during the day either..
Edit: 1000th post 
 
Re: Always running engine + lights - 
Phanto90 -  29.04.2011
Why lights always on D: Better make that user can turn it on or off :/
Quote:
| 
					Originally Posted by Vince  Exactly. This script is pretty useless if you ask me. Engines are automatically started when a player enters a vehicle and lights are also automatically turned on when it gets night. Lights aren't visible during the day either.. | 
 Not so true. Lights with manual accension are visible also during day from version 0.3c.
See this. In a screeshot I turned on the lights during daylight.
https://sampforum.blast.hk/showthread.php?tid=251578
However I find it useless too.
Respuesta: Always running engine + lights - 
[DOG]irinel1996 -  29.04.2011
for(new i=0; i<1000; i++)  ==> for(new i=0; i<MAX_VEHICLES; i++)