vehicle lights
#1

i got a problem with my car lights,
they don't shine..

pawn Код:
CMD:lights(playerid, params[]) {
    if(IsPlayerInAnyVehicle(playerid)) {
        new engine, lights, alarm, doors, bonnet, boot, objective, vid;
            vid = GetPlayerVehicleID(playerid);
            GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
            if(lights == 0) {
                SetVehicleParamsEx(vid, engine, 1, alarm, doors, bonnet, boot, objective);
                new message[240], pname[MAX_PLAYER_NAME];
                GetPlayerName(playerid, pname, sizeof(pname));
                format(message, sizeof(message), "*** %s turns on the lights of the %s ***", pname, vname(vid));
                ProxDetector(30.0, playerid, message, COLOR_LIGHTRED);
            } else {
                SetVehicleParamsEx(vid, engine, 0, alarm, doors, bonnet, boot, objective);
                new message[240], pname[MAX_PLAYER_NAME];
                GetPlayerName(playerid, pname, sizeof(pname));
                format(message, sizeof(message), "*** %s turns off the lights of the %s ***", pname, vname(vid));
                ProxDetector(30.0, playerid, message, COLOR_LIGHTRED);
            }
   }
   return 1;
}
it doesn't turn on the lights of my vehicle but it does send the message..
the strange thing is, when i leave my vehicle the lights are one, when i enter they're off.. XD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)