SA-MP Forums Archive
[HELP] Lights - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Lights (/showthread.php?tid=207706)



[HELP] Lights - Larsey123IsMe - 06.01.2011

Hmm.

How to make a command like:

/lightson
/lightsoff

For vehicles...

...I searched and found something.. but i didnt understand that code =/


Re: [HELP] Lights - Chrillzen - 06.01.2011

Quote:

/lightson

/lightsoff

// For Vehicles
There you go.


Re: [HELP] Lights - iggy1 - 06.01.2011

pawn Код:
COMMAND:lightson(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid))return
        SendClientMessage(playerid, 0x33FF66FF, "ERROR: You must be in a vehicle to use that command");
    else
    {
        SetVehicleParamsEx(GetPlayerVehicleID(playerid), -1, VEHICLE_PARAMS_ON, -1, -1, -1, -1, -1);
        SendClientMessage(playerid, SKY_BLUE, "The lights are {33FF66}on");
    }
    return 1;
}

COMMAND:lightsoff(playerid, params[])
{
    if(!IsPlayerInAnyVehicle(playerid))return
        SendClientMessage(playerid, 0x33FF66FF, "ERROR: You must be in a vehicle to use that command");
    else
    {
        SetVehicleParamsEx(GetPlayerVehicleID(playerid), -1, VEHICLE_PARAMS_OFF, -1, -1, -1, -1, -1);
        SendClientMessage(playerid, SKY_BLUE, "The lights are {FF7A7A}off");
    }
    return 1;
}
That should be clear. Colours need changing if your going to use that code.


Re: [HELP] Lights - Larsey123IsMe - 06.01.2011

Thank You iggi1

And... Chrillzen, no point to post unnessicery posts