[HELP] Lights
#1

Hmm.

How to make a command like:

/lightson
/lightsoff

For vehicles...

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

Quote:

/lightson

/lightsoff

// For Vehicles
There you go.
Reply
#3

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

Thank You iggi1

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


Forum Jump:


Users browsing this thread: 2 Guest(s)