Jump to content

PanBob

Members
  • Posts

    11
  • Joined

  • Last visited

About PanBob

  • Birthday June 29

Details

  • Location
    Polska

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

PanBob's Achievements

Square

Square (6/54)

0

Reputation

  1. It does not work. .lua: addEventHandler("onPlayerChat", getRootElement(), function(msg) if (isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then cancelEvent() outputChatBox("[Admin] " .. getPlayerName(source) .. ": " .. msg, getRootElement(), 255, 255, 255, true) end end meta.xml: <meta> <info author="PanBob" type="script" /> <script src="tag.lua" type="server" /> </meta> what is wrong?
  2. 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 )
  3. Oh... sorry. here: 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 )
  4. 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 )
  5. I'm looking for a script that will display before nick player if he has the status of Admin before nickname will be (Admin) nick. Sorry for my english.
  6. IS it also will work when the player to create a vehicle panel f1?
  7. Looking for a script or a guide, when a player creates a car through F1 create his car in white. Such a thing is to drop club. Sorry for my english. For help +rep
×
×
  • Create New...