Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. isObjectInACLGroup
  2. setVehicleRespawnPosition
  3. oh, i don't see where is the event onPlayerLogin in your code.
  4. Change line 21 to: addEventHandler ( "onPlayerQuit", getRootElement ( ), function() saveAccountData(source) end)
  5. respawnVehicle
  6. هو قصده معدل على الصيغه بعد التشفير اكيد طبعا اذا غيرت الصيغه بعد التشفير مثلا من luac الى lua بينعطب الملف
  7. You see this? for player,i in pairs(getElementsByType("player")) do It should be: for i,player in pairs(getElementsByType("player")) do
  8. اول شي سو الماركر للتحقق ان اللاعب داخل الماركر isElementWithinMarker مع الفنكشن onClientPlayerDamage بعدين استخدم الأفنت cancelEvent بعدين ببساطة الغي الحدث بالفنكشن
  9. You're welcome.
  10. Huh? you kidding me? Did you even start the resource? Post your meta or upload your resource at: http://mediafire.com
  11. Huh? this is the same, i only change p to killer and added a check. Let me know what this code output. Client Side: function statsup(killer) outputChatBox("Client Test: 1") if killer and killer == localPlayer and getElementData(source, "filmbot") then outputChatBox("Client Test: 2") triggerServerEvent("stats", killer) end end addEventHandler("onClientPedWasted", root, statsup) Server Side: function makeitgoup() outputChatBox("Server Test: 1") local statx = getPedStat(source, 63) if (statx > 2)then outputChatBox("Server Test: 2") triggerEvent("statsup22", source) setPedStat(source, 63, 0) outputChatBox("Server Test: 3") else outputChatBox("Server Test: 4") setPedStat(source, 63, statx + 1) end outputChatBox("Server Test: 5") end addEvent("stats", true) addEventHandler("stats", root, makeitgoup)
  12. function testPed() ..... if ( isPedDead ( shopKeeper ) ) then triggerClientEvent (source, "testMessage1", root) testMarker = createMarker(-27,-91.6, 1002.5, 'cylinder', 1.5, 0, 100, 255, 255) addEventHandler( "onMarkerHit", testMarker, testHit ) setElementInterior (robMarker, 18) end end function testHit ( thePlayer, matchingDimension ) local elementType = getElementType( thePlayer ) if (elementType) then triggerClientEvent (source, "testMessage2", root) end end
  13. Not my client-side, but your element data. getElementData(source, "filmbot") Where did you set the element data?
  14. Was your stat bigger than 2?
  15. https://forum.multitheftauto.com/viewtopic.php?f=91&t=48495
  16. There no function to respawn the ped, you will need to create the ped again. You can use this event: onPedWasted.
  17. Change this: if getElementType(target) == "ped" and target == testPed then To: if target and getElementType(target) == "ped" and target == testPed then And Change this: giveWeapon(target, 31, 100) To: giveWeapon(target, 31, 100, true)
  18. Try this (Not tested). --server testPed = createPed(skin, x, y, z) function testAttack(target) if getElementType(target) == "ped" and target == testPed then giveWeapon(target, 31, 100) triggerClientEvent(root, "testShoot", source, target) end end addEventHandler("onPlayerTarget", root, testAttack) --client function testShoot(target) local x, y, z = getElementPosition(source) setPedAimTarget(target, x, y, z) setPedControlState(target, "fire", true) end addEvent("testShoot", true) addEventHandler("testShoot", root, testShoot)
  19. The size of exitMarker is too small, try increase the size.
  20. createRadarArea createColRectangle getElementType toggleControl isElementWithinColShape cancelEvent Event: "onColShapeHit" Event: "onColShapeLeave" Event: "onClientPlayerDamage"
  21. createMarker isElementWithinMarker cancelEvent getPedOccupiedVehicle setElementPosition Event: "onClientMarkerHit" Event: "onClientPlayerDamage" createObject moveObject
  22. luac او lua ايضاً الملف مو لازم يكون آخره تقدر تحط اي شي
  23. function statsup(killer) if killer and killer == localPlayer and getElementData(source, "filmbot") then triggerServerEvent("stats", killer) end end addEventHandler("onClientPedWasted", root, statsup) function makeitgoup() local statx = getPedStat(source, 63) if (statx > 2)then triggerEvent("statsup22", source) setPedStat(source, 63, 0) else setPedStat(source, 63, statx + 1) end end addEvent("stats", true) addEventHandler("stats", root, makeitgoup) If it doesn't work, post the function that attached to the event "statsup22" and explain what is doesn't work.
  24. Line 10 and 12 the color code should go after " not before (same as line 29). Line 21 use source not team and remove team from line 20 (empty).
×
×
  • Create New...