Lights not working
#1

pawn Код:
CMD:lights(playerid, param[])
{
    new string[128], idx;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle.");
    idx = GetPlayerVehicleID(playerid);
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(idx, engine, lights, alarm, doors, bonnet, boot, objective);
    if(!lights)
    {
        SetVehicleParamsEx(idx, engine, 1, alarm, doors, bonnet, boot, objective);
        format(string, sizeof(string), "* %s turns their vehicle's lights on.", RPN(playerid));
        SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
        GameTextForPlayer(playerid, "~g~Lights On", 3500, 3);
    }
    else
    {
        SetVehicleParamsEx(idx, engine, 0, alarm, doors, bonnet, boot, objective);
        format(string, sizeof(string), "* %s turns their vehicle's lights off.", RPN(playerid));
        SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
        GameTextForPlayer(playerid, "~r~Lights Off", 3500, 3);
    }
    return 1;
}
Whay cant i sturn my lights on when its day i need that help
Reply


Messages In This Thread
Lights not working - by hulitubolies - 16.07.2012, 00:23
Re: Lights not working - by nepstep - 16.07.2012, 02:18
Re: Lights not working - by SuperViper - 16.07.2012, 03:07

Forum Jump:


Users browsing this thread: 1 Guest(s)