Jump to content

Search the Community

Showing results for tags 'disco lights'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. The console pops up: WARNING: discoswiatla/server.lua:26: Bad argument @ 'setVehicleHeadLightColor' [Expected vehicle at argument 1] server.lua: local discoTimer = {} local discoState = {} function vehicleLights( player, command, lig1, lig2, lig3 ) lig1 = lig1 or math.random( 0, 255 ) lig2 = lig2 or math.random( 0, 255 ) lig3 = lig3 or math.random( 0, 255 ) local vehicle = getPedOccupiedVehicle( player ) if ( vehicle ) then setVehicleHeadLightColor( vehicle, lig1, lig2, lig3 ) outputChatBox("Your Car Have now another Light!", player, 0, 255, 0 ) else outputChatBox("you must have a vehicle for doing this!", player, 255, 0, 0 ) end end addCommandHandler("lights",vehicleLights) -- Change your VehicleLights function Disco(player,command) local vehicle = getPedOccupiedVehicle(player) if (vehicle) then if discoState[player] == false then discoState[player] = true discoTimer[player] = setTimer( function ( playerVehicle ) setVehicleHeadLightColor( playerVehicle, math.random(0,255), math.random(0,255), math.random(0,255) ) end , 100, 0, vehicle ) outputChatBox( "!!Disco-Fever!!", player, 0, 255, 0 ) else if discoTimer[player] then killTimer( discoTimer[player] ) discoTimer[player] = nil discoState[player] = false setVehicleHeadLightColor( vehicle, 255, 255, 255 ) end end else outputChatBox( "!!You have to sit in a Car/Bike!!", player, 255, 0, 0 ) end end addCommandHandler("disco",Disco)--Disco ((((:)))) function reset(player, command ) local vehicle = getPedOccupiedVehicle(player) local r,g,b = getVehicleHeadLightColor(vehicle) if (vehicle) then if not (r==255) and not (g==255) and not (b==255) then setVehicleHeadLightColor( vehicle, 255,255,255) end end end addCommandHandler("reset",reset) function setStateOnStart() for _, players in ipairs( getElementsByType( "player" ) ) do discoState[players] = false end end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ), setStateOnStart ); function setStateOnJoin() discoState[source] = false end addEventHandler( "onPlayerJoin", getRootElement(), setStateOnJoin ) function removeStateOnQuit() discoState[source] = nil end addEventHandler( "onPlayerQuit", getRootElement(), setStateOnJoin )
×
×
  • Create New...