• Content count

  • Joined

  • Last visited

Community Reputation

12 Decent

About DeadthStrock

  • Rank
    Punk-@ss B*tch
  • Birthday 27/06/1999

Recent Profile Visitors

656 profile views
  1. DeadthStrock

    Attatching event to root vs resourceRoot

  2. DeadthStrock

    Attatching event to root vs resourceRoot

    Hi ! what represents the 3rd argument [ true ] of "addEvent" ?
  3. DeadthStrock

    please help me please :'(

    I think your problem is... , when a GUI button was pressed by me, Infernus car should replaced only to me. But above code will replace it to all players. Is it your problem ? or what ?
  4. DeadthStrock

    Help with command, it's works but WARNING in console

    Or you can check that are there any element exist before destroy it. barreratbl = {} function consoleCreateObject ( player, commandName ) if exports.factions:isPlayerInFaction(player, 1) then local x, y, z = getElementPosition ( player ) -- get the player's position -- create a Object next to the player: obb = createObject ( 1228, x + 2, y , z, 0, 0, 0 ) table.insert (barreratbl, obb) if (obb) then outputChatBox("Barrier created",player,0,255,0) else outputChatBox("Barrier not created",player,255,0,0) end else outputChatBox("You aren't FCPD!!",player,255,0,0) end end addCommandHandler ( "barrera", consoleCreateObject ) function consoleCreateObject ( player, commandName ) if exports.factions:isPlayerInFaction(player, 1) then for i, v in pairs (barreratbl) do if isElement( v ) then destroyElement ( v )-- check if the Obeject was created successfully outputChatBox("The object was removed!!",player,0,255,0) end end else outputConsole ( "you aren't FCPD!!", player ) end end
  5. Well, can you see some edit options [ B, I, u] where you typing the texts to post ? There you can see a symbols like this <>. Click on it and paste your lua code there and click insert into post.
  6. I suggest you to use "moveObject" in this position. Can you please post your lua code with code option in edit panel ?
  7. You mean that marker should keep going with a same velocity when someone hit it ?
  8. DeadthStrock

    [Help] Markers visibility

    This is an untested example. Hope it working ! Here you are ... local act1Markefalse createMarker(2445.3193359375,2376.3627929688,12.163512229919, "cylinder", 1.0,0,246,255,50) createBlipAttachedTo(act1Marker1,60) setElementData ( act1Marker1, "work", true ) local act1Marker2 = createMarker(2435.3193359375,2376.3627929688,12.163512229919, "cylinder", 1.0,0,246,255,50) setElementVisibleTo ( act1Marker2 , root, false ) setElementData ( act1Marker2, "work", false ) addEventHandler("onMarkerHit",act1Marker1, function(hitElement,matchingDimension) if getElementData ( source, "work" ) == true then triggerClientEvent("showGui", hitElement, hitElement) end end) function startact1Job(thePlayer) outputChatBox("Anda al siguiente marker!", hitElement,100,100,100) setElementVisibleTo ( act1Marker1, root, false) setElementData ( act1Marker1, "work", false ) setElementVisibleTo ( act1Marker2, root, true) setElementData ( act1Marker2, "work", true ) end addEvent("giveact1Job",true) addEventHandler("giveact1Job", root, startact1Job) function MarkerHit54( hitElement, matchingDimension ) if getElementData ( source, "work" ) == true then outputChatBox("Ganaste!", hitElement,100,100,100) setElementVisibleTo ( act1Marker1, root, true) setElementData ( act1Marker1, "work", true ) setElementVisibleTo ( act1Marker2, root, false) setElementData ( act1Marker2, "work", false ) end end addEventHandler( "onMarkerHit", act1Marker2, MarkerHit54 )
  9. DeadthStrock

    [Help] Markers visibility

    So, it's easy to use setElementData to set an data to the marker when someone hit and check that element data is true or false when someone again hit it to decide that function should run or not.
  10. DeadthStrock

    [Help] Markers visibility

    Well, as I understand... Use "destroyElement" to destroy the marker when someone hit. Instead of changing it's visibility. destroyElement([[Marker_Name]])
  11. DeadthStrock


    use /debugscript 3 command in game. Are there any script error related to this script ? Don't hesitate to display them here !
  12. DeadthStrock

    Respawn vehicle by command

    As @LyricalMM said, you can create a vehicle, and set a data to it that change when player enter the vehicle or when the vehicle get destroyed or something else. then you can use addCommandHandler function to add a command to respawn the vehicle if vehicle's data has changed.
  13. DeadthStrock

    How to stop a command? Help

    Actually, Difference 01 :- The code that you have got from wiki will create a red marker near the player who command. And my code with your command fix will helps to move a certain object when a player command. Difference 02 :- The code that you have got from wiki has written the function separately from "addCommandHandler" event. As well as that function has given a name 'consoleCreateMarker'. And you can see.. that name has put into the 'addCommandHandler' event. But my code with your command fix has directly insert the function into the 'addCommandHandler' event without a function name. That's all I saw as different between that 2 codes. And note that my sample code is a simple code just generated by me.
  14. DeadthStrock

    How to stop a command? Help

    Server Side :- gate = --[ create a gate here ]-- gateOpen = false -- gate is closed by default addCommandHandler("openGate", function (player,command) if gateOpen ~= true then --[ set gate's position when opened ] -- outputChatBox("Gate Opened !",player,255,255,0) gateOpen = true elseif gateOpen == true then outputChatBox("Gate already opened !",player,255,0,0) end end addCommandHandler("closeGate", function (player,command) if gateOpen == true then --[ set gate's position when closed ] -- outputChatBox("Gate Closed !",player,255,255,0) gateOpen = false else outputChatBox("Gate already closed !",player,255,0,0) end end I think you are finding a thing like above. if so, then above is a sample that doesn't tested and completed yet.
  15. DeadthStrock

    Get a Random Player Inside a Col

    Hi ! Can you tell me a way to get a random player among players inside a col ? [ col refers to an area created by "createColSphere" function. ] "getRandomPlayer" function can't be use since it choose a random player from all players in the server. Any other way ?