[FilterScript] Always running engine + lights
#1



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=0i<1000i++) //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;

Reply
#2

Hm Good
Reply
#3

simply gud
Reply
#4

Nice Job!
Reply
#5

Great job
Reply
#6

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.
Reply
#7

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.
Reply
#8

Good
Reply
#9

Thank you all.
Reply
#10

more comments please
Reply
#11

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)
Reply
#12

I dont like it.
A timer for 5 seconds isnt good.
Reply
#13

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
Reply
#14

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.
Reply
#15

for(new i=0; i<1000; i++) ==> for(new i=0; i<MAX_VEHICLES; i++)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)