Jump to content

Smart.

Members
  • Posts

    340
  • Joined

  • Last visited

Everything posted by Smart.

  1. Smart.

    Nyancars

    Why didn't I think of this.. this is completely stunning! Good job lmao
  2. 1. No one will script for free. 2. Please, come up with something more original. 3. This is the worst "I need scripters" thread I've ever seen.
  3. Do you mean the resource drive by? https://community.multitheftauto.com/index.php?p= ... tails&id=6
  4. I'm not sure, but I think the resource needs to be added into the ACL if it isn't.
  5. http://www.lua.org/about.html Look at the very bottom. I rest my case.
  6. A tip, when creaing GUI's use some other then GUIEditor_Window[1] = guiCreateWindow(0.3875,0.2833,0.16,0.6117,"System of Trains",true) It'll be alot more easier for the scripter. trainWindow = guiCreateWindow(0.3875,0.2833,0.16,0.6117,"System of Trains",true) Also, I wouldn't call it a train system since it's basically just a warp system.
  7. I highly doubt anyone will make this for you, especially of you want it for free. FYI: it's written lua not LUA.
  8. You should make a bit more clear then well looks nice. Well written code, easy to read might continue on this. GJ
  9. You need to specify an ID for the ped, which will set the skin ID. function markerHit ( hitPlayer ) if ( hitPlayer == localPlayer and source == marker ) then guiSetVisible( GUIEditor_Window[1], true ) showCursor(true) triggerServerEvent ( "cm", getLocalPlayer() ) ped = createPed( skinID, 1654.16162, -1661.63123, 21.9 ) -- change skinID to the id you want the ped to wear/have setElementFrozen ( ped , true ) setElementDimension( ped, 2 ) end end addEventHandler ( "onClientMarkerHit", root, markerHit )
  10. Smart.

    How!

    You already have a topic.. viewtopic.php?f=105&t=42554
  11. Smart.

    Need help

    It means he's changed the topic into another section, where it should be.
  12. Smart.

    Need help

    I think you may need to contact serverFFS's technical support for this, unless you have access to the server desktop. And FYI ServerFFS sucks.
  13. Server side. @seb: Your script would output the message to everyone, since you're using "client" as player element instead of "thePlayer". Yea well, we don't know if he wanted it to show for everyone or just the player, anyhow I've changed it. He also asked us WHAT is bad, not to actually write the code he wanted
  14. function getpos( thePlayer ) x,y,z = getElementPosition( thePlayer ) outputChatBox( "ur pos is X: " ..x.. "Y: " ..y.. "Z: " ..z.. "!", thePlayer) -- here you had (X) (Y) which wouldn't output the result, it would output what you wrote, you need to "end" the message, and add "MESSAGE" ..x.. "MSG2" ..z.. cheers. end addCommandHandler("getpos", getpos) server sided.
  15. This is such old topic, everything has changed and this can be locked. I'll be releasing all the scripts i had the time to make, soon tho.
  16. Your screenshot is invalid -.-
  17. Tested and working perfectly.. local tVehicles = { [ 598 ] = true; [ 596 ] = true; [ 597 ] = true; [ 411 ] = true; [ 599 ] = true; } p_lights = {} p_timer = {} p_lvar = {} p_pvar = {} p_lvar2 = {} p_lvar3 = {} p_lvar4 = {} function toggleLights(thePlayer, cmd, level) local level = tonumber(level) if not(level) then outputChatBox("#FF0000 Please select a level![1-2]", thePlayer, 255, 255, 255, true) return end if(level < 1) or (level > 2) then outputChatBox("#FF0000 Please select a level between 1-2!", thePlayer, 255, 255, 255, true) return end local veh = getPedOccupiedVehicle(thePlayer) local id = getElementModel(veh) if ( tVehicles [ getPedOccupiedVehicle ( thePlayer ) ] ) then if(level == 1) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_pvar[veh] = 1 p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar[veh] == 0) or (p_lvar[veh] == nil) then p_lvar[veh] = 1 setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar[veh] = 0 end end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end elseif(level == 2) then if(p_lights[veh] == 0) or(p_lights[veh] == nil) then p_lights[veh] = 1 outputChatBox("#FFFFFFYour Police-lights has been #00FF00enabled.", thePlayer, 0, 200, 100, true) setVehicleOverrideLights ( veh, 2 ) p_timer[veh] = setTimer( function() if(p_lvar3[veh] == 4) then setTimer(function() p_lvar3[veh] = 0 end, 1000, 1) setTimer( function() if(p_lvar4[veh] == 1)then p_lvar4[veh] = 0 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 77, 77, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 77, 77) p_lvar4[veh] = 1 end end, 50, 5) return end if(p_lvar2[veh] == 0) or (p_lvar2[veh] == nil) then p_lvar2[veh] = 1 -- 0 = vorne links 1 = vorne rechts 2 = hinten links 3 = hinten rechts setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 0, 1) setVehicleLightState ( veh, 3, 1) setVehicleHeadLightColor(veh, 0, 0, 255) else setVehicleLightState ( veh, 3, 0) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 1) setVehicleLightState ( veh, 2, 1) setVehicleHeadLightColor(veh, 255, 0, 0) p_lvar2[veh] = 0 end if(p_lvar3[veh] == nil) then p_lvar3[veh] = 0 end p_lvar3[veh] = (p_lvar3[veh]+1) end, 500, 0) else p_lights[veh] = 0 outputChatBox("#FFFFFFYour Police-lights has been #00FF00disabled.", thePlayer, 0, 200, 100, true) killTimer(p_timer[veh]) setVehicleLightState ( veh, 0, 0) setVehicleLightState ( veh, 1, 0) setVehicleLightState ( veh, 2, 0) setVehicleLightState ( veh, 3, 0) setVehicleHeadLightColor(veh, 255, 255, 255) setVehicleOverrideLights ( veh, 1 ) end end end end addCommandHandler("lights", toggleLights) addEventHandler ( "onVehicleExplode", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler ( "onVehicleRespawn", getRootElement(), function() if(p_lights[source] == 1) then killTimer(p_timer[source]) end end ) addEventHandler("onElementDestroy", getRootElement(), function () if getElementType(source) == "vehicle" then if(p_lights[source] == 1) then killTimer(p_timer[source]) end end end)
  18. Oh, lol my misstake I didn't do anything but changing the position of his code. and didn't notice any difference
  19. Well, mine is exactly the same as yours draken.
  20. Smart.

    Netrac RPG.

    Oh yes, I still got a far way to go though And, thanks btw, our website is up and the irc network should work as well. http://netrac-mta.com/ irc.netrac-mta.com:6667
×
×
  • Create New...