Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. A: No, money pay for me (DUH!!!) Q: If one doctor doctors another doctor does the doctor who doctors the doctor doctor the doctor the way the doctor he is doctoring doctors? Or does the doctor doctor the way the doctor who doctors doctors?
  2. http://lua-users.org/wiki/TableLibraryTutorial You will find table.sort
  3. JR10

    Vehicle ID

    This is wrong, first setElementID uses a string. Your event arguments are wrong. And at your warpVehicle, what the player types (vehicle) won't be a real vehicle, just a string. Seriously read the WIKI -- Do the vehicle ID function idVehicle(theVehicle) setElementID(theVehicle, tostring(math.random(1, 9999))) end addEventHandler("onVehicleRespawn", getRootElement(), idVehicle) -- Show the entered vehicle's ID function showVehicleID(sourcePlayer) local vehicle = getElementID(source) outputChatBox("* This vehicle's ID is: " .. vehicle, sourcePlayer, 220, 220, 0, true) end addEventHandler("onVehicleEnter", getRootElement(), showVehicleID) -- Warp the specified ID to a location (x, y, z) function warpVehicle(sourcePlayer, commandName, vehicle, posX, posY, posZ) local veh = getElementByID(vehicle) setElementPosition(veh, posX, posY, posZ) outputChatBox("* Vehicle ID " .. getElementID(veh) .. " spawned.", sourcePlayer, 0, 255, 0, true) end addCommandHandler("warpid", warpVehicle)
  4. You can make a (server side) loop that will get the data from each account, and trigger a client event with that data. And in the client event add a one grid list row. Ascending, why?, won't matter sorting the table.
  5. JR10

    Vehicle ID

    setElementID ??
  6. Server side: local accounts = getAccounts() triggerClientEvent("event", player, accounts) Client side: addEvent("event", true) addEventHandler("event", root, function(accounts) --code end)
  7. A: magical, complex, difficult, imaginary, fuck, shit, BAM, BOOM BOOM BOOM, I want you in my room. Q: do fish get thirsty?
  8. Indeed, but as Remi posted, he dropped support for 1.0.5
  9. There is few res editor resources on the community. I made one too, but not so good.
  10. https://community.multitheftauto.com/index.php?p= ... ls&id=2609 It's Castillo's panel, he linked the original one, but I don't think he asked him. I'm not sure if this should be deleted.
  11. JR10

    if check dont work

    Thanks, btw you should add a screenshot without the speedo, others will think it's with the resource.
  12. JR10

    if check dont work

    You welcome, I see you released it.
  13. JR10

    if check dont work

    That's because you made x, y, z global with the creation position. Try: colshape = createColRectangle (313.0009765625, 1033.708984375, 100, 100) colshapeinterior = setElementInterior(colshape, 9) function createAndroMarker(thePlayer) local x,y,z = getElementPosition( vehicle ) vehicle = getPedOccupiedVehicle(thePlayer) theMarker = createMarker ( x - 25, y + 5, z, "cylinder", 20.5, 0, 0, 255, 170 ) setTimer ( removeMarker, 4000, 1 ) addEventHandler( "onMarkerHit", theMarker, warpPlayerIntoAndro ) end addCommandHandler("marker", createAndroMarker) function warpPlayerIntoAndro(hitElement, dimensionMatch) outputDebugString("Warp function triggered") if getElementType(hitElement) ~= "player" then return end if isPedInVehicle(hitElement) then removePedFromVehicle(hitElement) end setElementInterior(hitElement, 9, 315.48, 984.13, 1959.11 ) end function removeMarker() destroyElement ( theMarker ) end function warpPlayerOut(hitElement) if getElementType(hitElement) ~= "player" then return end local x, y, z = getElementPosition( vehicle ) setElementPosition(hitElement, x, y, z) end addEventHandler ( "onColShapeHit", colshape, warpPlayerOut )
  14. JR10

    if check dont work

    Here: colshape = createColRectangle (313.0009765625, 1033.708984375, 100, 100) colshapeinterior = setElementInterior(colshape, 9) function createAndroMarker(thePlayer) x,y,z = getElementPosition( vehicle ) vehicle = getPedOccupiedVehicle(thePlayer) theMarker = createMarker ( x - 25, y + 5, z, "cylinder", 20.5, 0, 0, 255, 170 ) setTimer ( removeMarker, 4000, 1 ) addEventHandler( "onMarkerHit", theMarker, warpPlayerIntoAndro ) end addCommandHandler("marker", createAndroMarker) function warpPlayerIntoAndro(hitElement, dimensionMatch) outputDebugString("Warp function triggered") if getElementType(hitElement) ~= "player" then return end if isPedInVehicle(hitElement) then removePedFromVehicle(hitElement) end setElementInterior(hitElement, 9, 315.48, 984.13, 1959.11 ) end function removeMarker() destroyElement ( theMarker ) end function warpPlayerOut(hitElement) if getElementType(hitElement) ~= "player" then return end setElementPosition(hitElement, x, y, z) end addEventHandler ( "onColShapeHit", colshape, warpPlayerOut )
  15. Add the sound to the meta. Meta.xml: <file src="soundPath.mp3" /> Use this to play it: playSound("soundPath.mp3", false) And of course change soundPath to the finish sound path.
  16. Try: Server side: addEvent("sendMsgToAttacker", true) addEventHandler("sendMsgToAttacker", root, function() outputChatBox("Dontkill with Fist!!",source,0,255,0) end) Client side: outputChatBox("No-TbGes|x[Dev-PoinT]x",255,255,0) function stopMinigunDamage( attacker, weapon, bodypart ) if ( weapon == 0 ) then outputChatBox("Dontkill with Fist!!",0,255,0) cancelEvent() triggerServerEvent("sendMsgToAttacker", attacker) end end addEventHandler ( "onClientPlayerDamage", root, stopMinigunDamage) Both players will see the message. You can remove outputChatBox in the client side, so only the attacker see the message.
×
×
  • Create New...