[HELP] Lights
#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


Messages In This Thread
[HELP] Lights - by Larsey123IsMe - 06.01.2011, 19:18
Re: [HELP] Lights - by Chrillzen - 06.01.2011, 19:20
Re: [HELP] Lights - by iggy1 - 06.01.2011, 19:20
Re: [HELP] Lights - by Larsey123IsMe - 06.01.2011, 19:36

Forum Jump:


Users browsing this thread: 1 Guest(s)