
Apo
Members-
Posts
141 -
Joined
-
Last visited
Everything posted by Apo
-
hi in need call911 and set wanted for jacked local call = {} function vehicleExitJack ( thePlayer, seat, jacked ) if jacked then call[thePlayer] = true setTimer ( kill911, 60000, 1, thePlayer ) end end addEventHandler ( "onVehicleExit", getRootElement(), vehicleExitJack ) function kill911 (thePlayer) call[thePlayer] = false end function call911(thePlayer) if call[thePlayer] == true then setPlayerWantedLevel ( jacked, 6 ) end end addCommandHandler("call911",call911)
-
hi guys please help me for hit my mark my problem all player can hit my mark i need only The player who has used the command can hit mark blip = nil marker = nil function mark(thePlayer) if blip == nil and marker == nil then local x, y, z = 1819.8046875, -1831.2685546875, 13.4140625 local z = z - 1 marker = createMarker( x, y, z, "cylinder", 2, 255, 0, 0, 150, getRootElement(thePlayer )) blip= createBlipAttachedTo(marker, 0, 2, 255, 0, 255, 255) setElementVisibleTo(marker, getRootElement(), false) setElementVisibleTo(marker, thePlayer, true) else destroyElement(blip) destroyElement(marker) blip = nil marker = nil end end addCommandHandler("mark", mark, false, false) function markhit (element) if (source == marker) then destroyElement(marker) destroyElement(blip) end end addEventHandler("onMarkerHit", root, markhit)
-
you need (killer, "missionz") setelemntdata for (killer, "missionz")
-
hi guys please help me for fix markerhit client marker = nil blip = nil function redpoint() marker = createMarker( 842.9404296875, -1859.5, 12.8671875, "cylinder", 2, 255, 0, 0, 255,getRootElement(localPlayer)) blip= createBlipAttachedTo(marker, 0, 4, 255, 0, 0, 255) setElementVisibleTo(marker, getRootElement(localPlayer), false) setElementVisibleTo(marker, localPlayer, true) end addCommandHandler("marker",redpoint) function markhit (element) if element and getElementType ( element ) == 'player' then if (source == marker) then destroyElement( marker) destroyElement( blip) marker = nil blip = nil end end end addEventHandler("onMarkerHit", marker, markhit)
-
hey guys. i have a ( for ). i put an outputchatbox in it but i need only one though i get 10x outputchatboxes. function cout(thePlayer) local id = tonumber(getElementData(thePlayer,"ids")) for x=1 , 10 then if x == id then outputChatBox("yes") -- فی المکان end end end addCommandHandler("cout",cout)
-
hi guys please help me for fix my error vehicls\vehicleload.lua: cannot resume dead coroutine [string "?"] local toLoad = { } local threads = { } ---جولة ---مركبة تشغيل function loadveh(res) local result = mysql:query("SELECT id FROM `vehicles` WHERE deleted=0 ORDER BY `id` ASC") if result then while true do local row = mysql:fetch_assoc(result) if not row then break end toLoad[tonumber(row["id"])] = true ----مركبة end mysql:free_result(result) for id in pairs( toLoad ) do local co = coroutine.create(loadOneVehicle) coroutine.resume(co, id, true) table.insert(threads, co) end setTimer(resume, 1000, 4) end end addEventHandler("onResourceStart", getResourceRootElement(), loadAllVehicles) function resume() for key, value in ipairs(threads) do coroutine.resume(value)-----تحذير end end
-
hi guys please help me for fix my code if player killed by other player can use command 911 and setwanted for killer local cooldown = {} function onStealthKill(thePlayer,targetPlayer) outputChatBox("Stealth kill!", source) targetPlayer, targetPlayerName = exports.global:findPlayerByPartialNick(thePlayer, targetPlayer) outputChatBox("" .. getPlayerName(thePlayer) .. " has been stealth-killed by " .. getPlayerName(source) .. ".",thePlayer,100,155,100) call911[targetPlayer] = true cooldown[targetPlayer] = setTimer(timerEnd, 60000, 1, targetPlayer) addCommandHandler("911",function() if cooldown[targetPlayer] and isTimer(cooldown[targetPlayer]) then setPlayerWantedLevel ( source, 1 ) end end) end addEventHandler("onPlayerStealthKill", getRootElement(), onStealthKill) function timerEnd(thePlayer) if cooldown[thePlayer] and isTimer(cooldown[thePlayer]) then killTimer(cooldown[thePlayer]) cooldown[thePlayer] = nil end end
-
hi please help me how to setinterior and dimension for createprojecttitle function shoot1ing() local x, y, z = getElementPosition(getLocalPlayer()) local test = createProjectile(getLocalPlayer(), 16,1726.9296875, -1912.564453125, 13.563646316528,0) setElementDimension(test,10) setElementInterior(test,15) end setTimer(shoot1ing,5000,0)
-
hi please help me for show and delet hillArea = { {1436.6826171875, -2940.1494140625, 13.546875, 500,500,500}, {1436.6826171875, -2640.1494140625, 13.546875, 500,500,500}, {1436.6826171875, -2340.1494140625, 13.546875, 500,500,500}, {1436.6826171875, -640.1494140625, 13.546875, 500,500,500} } hillRadar = { {1262.2802734375, -2769.48828125, 300, 300, 171, 175, 174, 80}, {1262.2802734375, -2469.48828125, 300, 300, 92, 46, 2, 80}, {2762.2802734375, -2169.48828125, 200, 300, 255, 0, 143, 80} } turfCol = nil hillRadars = nil function maketurf (thePlayer) if turfcol == nil and hillRadars == nil then for i,v2 in ipairs(hillArea) do turfCol = createColCuboid(unpack(v2)) end for i,v1 in ipairs(hillRadar) do hillRadars = createRadarArea(unpack(v1)) end else destroyElement(turfcol) destroyElement(hillRadars) turfCol = nil hillRadars = nil end end addCommandHandler("show",maketurf)