Jump to content

Yurigarga

Members
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Yurigarga

  1. [2018-07-24 18:53:45] ERROR: [gameplay]/Freeroam/fr_server.lua:351: bad argument #1 to 'ipairs' (table expected, got string) I need help. Could you resolve this error? function giveMeVehicles(vehicles) if type(vehicles) == 'number' then vehicles = { vehicles } end local px, py, pz, prot local radius = 3 local playerVehicle = getPedOccupiedVehicle(source) if playerVehicle and isElement(playerVehicle) then px, py, pz = getElementPosition(playerVehicle) prot, prot, prot = getVehicleRotation(playerVehicle) else px, py, pz = getElementPosition(source) prot = getPedRotation(source) end local offsetRot = math.rad(prot) local vx = px + radius * math.cos(offsetRot) local vy = py + radius * math.sin(offsetRot) local vz = pz + 2 local vrot = prot local vehicleList = g_PlayerData[source].vehicles local vehicle if ( not vehicles ) then return end for i,vehID in ipairs(vehicles) do if i > getOption('vehicles.maxperplayer') then break end if vehID < 400 or vehID > 611 then errMsg(vehID ..' is incorrect vehicle model', source) elseif not table.find(getOption('vehicles.disallowed'), vehID) then if #vehicleList >= getOption('vehicles.maxperplayer') then unloadVehicle(vehicleList[1]) end vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) if (not isElement(vehicle)) then return end setElementInterior(vehicle, getElementInterior(source)) setElementDimension(vehicle, getElementDimension(source)) table.insert(vehicleList, vehicle) g_VehicleData[vehicle] = { creator = source, timers = {} } if vehID == 464 then warpPedIntoVehicle(source, vehicle) elseif not g_Trailers[vehID] then if getOption('vehicles.idleexplode') then g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) end g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) end vx = vx + 4 vz = vz + 4 else errMsg(getVehicleNameFromModel(vehID):gsub('y$', 'ie') .. 's are not allowed', source) end end end
  2. local tags = {} local fastWrite = {} local someMessage = {} local antiSpam = {} local serials = {} local muteliler = {} local due = {} local ayarlar = { -- meta.xml den çekilen ayarlar excludedGroups = get"ExcludedGroups" or {}, mesajGorme = get"MesajGorme" or "true", spamKoruma = get"SpamKoruma" or "true", kisaltmaMesaj = get"KisaltmaMesaj" or "true", reklamKoruma = get"ReklamKoruma" or "true", yasakliKelimeler = get"blacklistedStrings" or {}, } addEventHandler('onPlayerChat', root ,function(text,typechat) -- chat eventi cancelEvent() local isim = getPlayerName(source) local r, g, b = getPlayerNametagColor(source) or math.random(0,255), math.random(0,255), math.random(0,255) local playerTag = playerTagDraw(source) local randomID = math.random ( 1, #articles ) local article = articles[randomID] local serial = getPlayerSerial(source) if serials[serial] then return end -- spam protection if ayarlar.spamKoruma then if not isPlayerExcluded(source) then if isTimer(antiSpam[source]) then cancelEvent() spamBlock(source,"Mutele") else antiSpam[source] = setTimer(function(player) antiSpam[player] = nil end, 1000, 1, source) end end end -- advertisement protection if ayarlar.reklamKoruma then if isAdvertisement(text) then if not isPlayerExcluded(source) then for i, yetkililer in ipairs (getElementsByType("player")) do if isPlayerExcluded(yetkililer) then if text == article then return end if ayarlar.mesajGorme then outputChatBox("#000000[#FF0000WARNİNG#000000] " .. isim .. " #FF0000the player made an ad: #FFFFFF" .. text, yetkililer, 255, 255, 255, true) outputServerLog("[ReklamUyari] " .. isim:gsub('#%x%x%x%x%x%x', '') .. ": " .. text) end end end if giveChance(source) then text = article else text = article spamBlock(source,"Mutele") end end end end -- fast write protection if fastWrite[source] and fastWrite[source] > getTickCount() then outputChatBox("write one by one!", source, 255, 0, 0) return else fastWrite[source] = getTickCount() end -- someMessage protection if someMessage[source] and someMessage[source] == text then outputChatBox("do not write the same words!!", source, 255, 0, 0) return else someMessage[source] = text end -- abbreviation message if ayarlar.kisaltmaMesaj then for i,v in pairs ( mesajTablo ) do for k,t in pairs(i) do if text:lower() == t then text = v end end end end if typechat == 2 then cancelEvent() end -- eğer Y den yazmışsa iptal et if typechat == 0 then -- eğer T den yazmış ise if playerYetkilimi(source) then -- eğer player yetkili ise local tag,chat = playerYetkilimi(source) -- yetkinin tagını ve chat renklerini çek outputChatBox(tag..isim..chat..text, root, r, g, b, true ) -- chate aktar elseif playerTag then -- eğer player panelden tag almışsa outputChatBox(playerTag.." "..isim.."#FFFFFF:#ededed "..text, root, r, g, b, true ) -- chate aktar else --eğer yukardakilerden ikiside yoksa outputChatBox(""..isim.."#FFFFFF:#FFFFFF "..text, root, r, g, b, true ) -- chate yolla end end outputServerLog( "CHAT: " .. isim:gsub('#%x%x%x%x%x%x', '').. ": " .. text ) --exports.ChatBubbles:outputMessage(source, text) end) -- Useful Functions and other events function playerYetkilimi(player) --player authority function if isElement(player) then local hesapismi = getAccountName(getPlayerAccount(player)) for i,yetkiler in pairs(yetkiliTaglar) do local acl,tag,chat = unpack(yetkiler) if aclGetGroup(acl) and isObjectInACLGroup("user." .. hesapismi, aclGetGroup(acl)) then return tag,chat end end end return false end function playerTagDraw(player) -- player tag draw function if tags[player] then return tags[player] else return false end end function isAdvertisement(str) -- export function (if the ad is) assert(type(str) == "string", "Bad argument 1 @ isAdvertisement [String expected, got " .. type(str) .. "]") local str = string.gsub(str, '#%x%x%x%x%x%x', '') local workingWord = string.lower(str):gsub("[_-;:µ|><!^#'%%!§$\\&/()=._-,-#+}{ ]", '').."-"; for index, sBadWord in pairs(ayarlar.yasakliKelimeler) do local pattern = workingWord:match(".*"..string.lower(sBadWord).."*."); if(pattern) then return sBadWord end end if str:find("(%d+)%.(%d+)%.(%d+)%.(%d+)") then return true end return false end function isPlayerExcluded(player) -- If the player is authorized local size = #ayarlar.excludedGroups if size ~= 0 then local accountName = getAccountName(getPlayerAccount(player)) for i=1, size do if isObjectInACLGroup("user." .. accountName, aclGetGroup(ayarlar.excludedGroups[i])) then return true end end end return false end addEventHandler("onPlayerConnect", root, function(playerNick, _, _, playerSerial, _) -- player can not run for 10 seconds at server entrance serials[playerSerial] = true setTimer(function() serials[playerSerial] = nil end, 1000*10,1) end) function giveDue(player) -- Forbidden word Give 3 due if not due[player] then due[player] = 1 outputChatBox("#FFFFFFyou wrote a forbidden word. #FFFFFFYou have #CC00002 rights .", player, 255,0,0, true) return true else due[player] = due[player]+1 if due[player] and due[player] > 2 then due[player] = nil return false end outputChatBox("#FFFFFFyou wrote a forbidden word.. #CC0000"..tostring(due[player]-1).." #FFFFFFHave rights.", player, 255,0,0, true) return true end end function spamBlock(player,value) -- Spam Blocking Function local serial = getPlayerSerial(player) if value == "Mutele" then outputChatBox(getPlayerName(player).."#CC0000 60 #FFFFFFSaniye Susturuldun. #CC0000Sebep: #FFFFFFFlood/Spam", root, 255,255,255,true) setPlayerMuted(player, true) setTimer (spamBlock, 60000, 1, player, "Mute Kaldır") muteliler[serial] = true elseif value == "Mute Kaldır" then if isElement (player) and isPlayerMuted (player) then setPlayerMuted ( player, false ) antiSpam[player] = nil muteliler[serial] = false outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #66FF00Cezan Bitti.",root, 255, 255, 0,true ) else antiSpam[player] = nil end end end addEventHandler("onPlayerJoin", root, function() -- while suspended reconnect punished local serial = getPlayerSerial(source) if muteliler[serial] then spamBlock(source,"Mutele") end end) addEventHandler("onPlayerQuit", root, function() if tags[source] then tags[source] = nil end end) addEvent("TagPanel:TagAyarla", true) addEventHandler("TagPanel:TagAyarla", root, function(chat,olay) if olay == "Değiştir" then tags[source] = chat outputChatBox("#FFFFFFTagın "..chat.." #FFFFFFolarak değiştirildi", source, 255,0,0, true) elseif olay == "Sıfırla" then tags[source] = nil outputChatBox("#FFFFFFTagını başarıyla sıfırladın.", source, 255,0,0, true) end end) 80% english look again pls
  3. warning:server.lua:187 Bad argument "getPlayerserial" {Expected player at argumant 1 , got string "benim tag oldumu" benim tag oldumu" ---->Chat writing can you look again ?
  4. Warning:dx_scoreboardexports.lua:45 setElementData Modifying players before on player Join can cause desynchrozation. This warning is bothering me.What should I do?
  5. [/url] function scoreboardAddColumn( name, forElement, width, friendlyName, priority ) if type( name ) == "string" then width = tonumber( width ) or 70 friendlyName = friendlyName or name priority = tonumber( priority ) or getNextFreePrioritySlot( scoreboardGetColumnPriority( "name" ) ) fixPrioritySlot( priority ) forElement = iif( type( forElement ) == "userdata" and isElement( forElement ), forElement, getRootElement() ) if forElement == getRootElement() then if not (priority > MAX_PRIRORITY_SLOT or priority < 1) then ---45.dize for key, value in ipairs( scoreboardColumns ) do if name == value.name then return false end end table.insert( scoreboardColumns, { ["name"] = name, ["width"] = width, ["friendlyName"] = friendlyName, ["priority"] = priority } ) table.sort( scoreboardColumns, function ( a, b ) return a.priority < b.priority end ) if sourceResource then if not resourceColumns[sourceResource] then resourceColumns[sourceResource] = {} end table.insert ( resourceColumns[sourceResource], name ) end return triggerClientEvent( getRootElement(), "doScoreboardAddColumn", getRootElement(), name, width, friendlyName, priority, sourceResource ) end else return triggerClientEvent( forElement, "doScoreboardAddColumn", getRootElement(), name, width, friendlyName, priority, sourceResource ) end end return false end
  6. [2018-07-10 14:19:03] WARNING: [gameplay]/yaratik/zombie_server.lua:320: Bad argument @ 'getElementPosition' [Expected element at argument 1] [2018-07-10 14:19:03] WARNING: [gameplay]/yaratik/zombie_server.lua:321: Bad argument @ 'getElementPosition' [Expected element at argument 1] [2018-07-10 14:19:03] WARNING: [gameplay]/yaratik/zombie_server.lua:322: Bad argument @ 'getDistanceBetweenPoints3D' [Expected vector3 at argument 1, got boolean] --CHECKS FOR ZOMBIE GRABBING FROM BEHIND function Playerthroatbitten ( player, attacker) local Zx, Zy, Zz = getElementPosition( attacker ) local Px, Py, Pz = getElementPosition( player ) local distance = (getDistanceBetweenPoints3D( Px, Py, Pz, Zx, Zy, Zz )) if (distance < 1) then ----323.dize killPed ( player, attacker, weapon, bodypart ) else setPedAnimation (player) end end
  7. function copyright(player) outputChatBox ("#FF0000FLY#0099FFTurk#990000FreeRoam", getRootElement(), 255, 255, 255, true ) outputChatBox ("#009977İyi Oyunlar Diler...", getRootElement(), 255, 255, 255, true ) end addEventHandler("onResourceStart", getRootElement(), copyright) function pajero(source) local x,y,z = getElementPosition(source) setPedAnimation (source, "FIGHT_B", "FIGHTB_G", -1, false, false, false, true) triggerClientEvent( source, "invocar2", source ) setTimer ( function() local pajaro = createObject(2673, x, y, z) setElementCollisionsEnabled (pajaro, false) local pajerito = createVehicle ( 415, x, y, z+80 ) attachElements(pajaro, pajerito,-0.5,0,0.1,0,270,0) setElementAlpha(pajerito, 0) warpPedIntoVehicle ( source, pajerito ) addEventHandler ( "onVehicleExplode", root, culiao ) addEventHandler ( "onPlayerQuit", root, culiao ) addEventHandler ( "onVehicleExit", root, culiao ) setPedAnimation (source, "bikeleap", "bk_blnce_in", -1, false, false, false, true) triggerClientEvent(source, "Rhypasa", source) end, 1000, 1 ) end addCommandHandler("kartal", pajero) function culiao () removeEventHandler ( "onVehicleExplode", root, culiao) removeEventHandler ( "onPlayerQuit", root, culiao ) removeEventHandler ( "onVehicleExit", root, culiao ) local pajaritos = getAttachedElements ( source ) for i,v in ipairs ( pajaritos) do detachElements ( v, source ) destroyElement(v) end end function asd(source) triggerClientEvent(source, "Rhypasan", source) end addEventHandler("onVehicleExit", root, asd) [2018-07-10 13:09:14] WARNING: [gameplay]/sc-kartaluc/server.lua:40: Bad argument @ 'detachElements' [Expected element at argument 1, got boolean][2018-07-10 13:09:14] WARNING: [gameplay]/sc-kartaluc/server.lua:41: Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean][2018-07-10 14:06:53] WARNING: [gameplay]/sc-kartaluc/server.lua:24: Bad usage @ 'addEventHandler' ['onVehicleExplode' with this function is already handled][2018-07-10 14:06:53] WARNING: [gameplay]/sc-kartaluc/server.lua:25: Bad usage @ 'addEventHandler' ['onPlayerQuit' with this function is already handled][2018-07-10 14:06:53] WARNING: [gameplay]/sc-kartaluc/server.lua:26: Bad usage @ 'addEventHandler' ['onVehicleExit' with this function is already handled] can you help me ?
  8. the whole of the error server.lua local taglar = {} local hizliYazma = {} local ayniMesaj = {} local antiSpam = {} local serialler = {} local muteliler = {} local hak = {} local ayarlar = { -- meta.xml den çekilen ayarlar excludedGroups = get"ExcludedGroups" or {}, mesajGorme = get"MesajGorme" or "true", spamKoruma = get"SpamKoruma" or "true", kisaltmaMesaj = get"KisaltmaMesaj" or "true", reklamKoruma = get"ReklamKoruma" or "true", yasakliKelimeler = get"blacklistedStrings" or {}, } addEventHandler('onPlayerChat', root ,function(text,typechat) -- chat eventi cancelEvent() local isim = getPlayerName(source) local r, g, b = getPlayerNametagColor(source) or math.random(0,255), math.random(0,255), math.random(0,255) local oyuncuTag = oyuncununTaginiCek(source) local randomID = math.random ( 1, #yazilar ) local yazi = yazilar[randomID] local serial = getPlayerSerial(source) if serialler[serial] then return end -- spam koruma if ayarlar.spamKoruma then if not isPlayerExcluded(source) then if isTimer(antiSpam[source]) then cancelEvent() spamEngelle(source,"Mutele") else antiSpam[source] = setTimer(function(oyuncu) antiSpam[oyuncu] = nil end, 1000, 1, source) end end end -- reklam koruma if ayarlar.reklamKoruma then if isAdvertisement(text) then if not isPlayerExcluded(source) then for i, yetkililer in ipairs (getElementsByType("player")) do if isPlayerExcluded(yetkililer) then if text == yazi then return end if ayarlar.mesajGorme then outputChatBox("#000000[#FF0000REKLAM UYARI#000000] " .. isim .. " #FF0000İsimli oyuncu reklam yaptı: #FFFFFF" .. text, yetkililer, 255, 255, 255, true) outputServerLog("[ReklamUyari] " .. isim:gsub('#%x%x%x%x%x%x', '') .. ": " .. text) end end end if hakVer(source) then text = yazi else text = yazi spamEngelle(source,"Mutele") end end end end -- hızlı yazma koruma if hizliYazma[source] and hizliYazma[source] > getTickCount() then outputChatBox("Teker teker yazınız!", source, 255, 0, 0) return else hizliYazma[source] = getTickCount() end -- aynı mesaj engelleme if ayniMesaj[source] and ayniMesaj[source] == text then outputChatBox("Aynı kelimeleri tekrarlamayınız!", source, 255, 0, 0) return else ayniMesaj[source] = text end -- kısaltma mesajlar if ayarlar.kisaltmaMesaj then for i,v in pairs ( mesajTablo ) do for k,t in pairs(i) do if text:lower() == t then text = v end end end end if typechat == 2 then cancelEvent() end -- eğer Y den yazmışsa iptal et if typechat == 0 then -- eğer T den yazmış ise if oyuncuYetkilimi(source) then -- eğer oyuncu yetkili ise local tag,chat = oyuncuYetkilimi(source) -- yetkinin tagını ve chat renklerini çek outputChatBox(tag..isim..chat..text, root, r, g, b, true ) -- chate aktar elseif oyuncuTag then -- eğer oyuncu panelden tag almışsa outputChatBox(oyuncuTag.." "..isim.."#FFFFFF:#ededed "..text, root, r, g, b, true ) -- chate aktar else --eğer yukardakilerden ikiside yoksa outputChatBox(""..isim.."#FFFFFF:#FFFFFF "..text, root, r, g, b, true ) -- chate yolla end end outputServerLog( "CHAT: " .. isim:gsub('#%x%x%x%x%x%x', '').. ": " .. text ) --exports.ChatBubbles:outputMessage(source, text) end) -- Kullanışlı Fonskiyonlar ve diğer olaylar function oyuncuYetkilimi(oyuncu) --oyuncu yetkilimi fonksiyon if isElement(oyuncu) then local hesapismi = getAccountName(getPlayerAccount(oyuncu)) for i,yetkiler in pairs(yetkiliTaglar) do local acl,tag,chat = unpack(yetkiler) if aclGetGroup(acl) and isObjectInACLGroup("user." .. hesapismi, aclGetGroup(acl)) then return tag,chat end end end return false end function oyuncununTaginiCek(oyuncu) -- oyuncunun tagını çekme fonksiyon if taglar[oyuncu] then return taglar[oyuncu] else return false end end function isAdvertisement(str) -- export fonksiyon (eğer kelime reklam ise) assert(type(str) == "string", "Bad argument 1 @ isAdvertisement [String expected, got " .. type(str) .. "]") local str = string.gsub(str, '#%x%x%x%x%x%x', '') local workingWord = string.lower(str):gsub("[_-;:µ|><!^#'%%!§$\\&/()=._-,-#+}{ ]", '').."-"; for index, sBadWord in pairs(ayarlar.yasakliKelimeler) do local pattern = workingWord:match(".*"..string.lower(sBadWord).."*."); if(pattern) then return sBadWord end end if str:find("(%d+)%.(%d+)%.(%d+)%.(%d+)") then return true end return false end function isPlayerExcluded(player) -- eğer oyuncu yetkili ise local size = #ayarlar.excludedGroups if size ~= 0 then local accountName = getAccountName(getPlayerAccount(player)) for i=1, size do if isObjectInACLGroup("user." .. accountName, aclGetGroup(ayarlar.excludedGroups[i])) then return true end end end return false end addEventHandler("onPlayerConnect", root, function(playerNick, _, _, playerSerial, _) -- oyuncu servera girince ilk 10sn. konuşmama serialler[playerSerial] = true setTimer(function() serialler[playerSerial] = nil end, 1000*10,1) end) function hakVer(oyuncu) -- Yasaklı kelime yazınca 3 hak verme if not hak[oyuncu] then hak[oyuncu] = 1 outputChatBox("#FFFFFFYasaklı bir kelime yazdın. #CC00002 #FFFFFFhakkın kaldı.", oyuncu, 255,0,0, true) return true else hak[oyuncu] = hak[oyuncu]+1 if hak[oyuncu] and hak[oyuncu] > 2 then hak[oyuncu] = nil return false end outputChatBox("#FFFFFFYasaklı bir kelime yazdın. #CC0000"..tostring(hak[oyuncu]-1).." #FFFFFFhakkın kaldı.", oyuncu, 255,0,0, true) return true end end function spamEngelle(oyuncu,deger) -- spam engelleme fonksiyon local serial = getPlayerSerial(oyuncu) if deger == "Mutele" then outputChatBox(getPlayerName(oyuncu).."#CC0000 60 #FFFFFFSaniye Susturuldun. #CC0000Sebep: #FFFFFFFlood/Spam", root, 255,255,255,true) setPlayerMuted(oyuncu, true) setTimer (spamEngelle, 60000, 1, oyuncu, "Mute Kaldır") muteliler[serial] = true elseif deger == "Mute Kaldır" then if isElement (oyuncu) and isPlayerMuted (oyuncu) then setPlayerMuted ( oyuncu, false ) antiSpam[oyuncu] = nil muteliler[serial] = false outputChatBox ("#FFFFFF"..getPlayerName ( oyuncu ).." #66FF00Cezan Bitti.",root, 255, 255, 0,true ) else antiSpam[oyuncu] = nil end end end addEventHandler("onPlayerJoin", root, function() -- muteli iken oyundan çıktığında tekrar muteleme local serial = getPlayerSerial(source) if muteliler[serial] then spamEngelle(source,"Mutele") end end) addEventHandler("onPlayerQuit", root, function() if taglar[source] then taglar[source] = nil end end) addEvent("TagPanel:TagAyarla", true) addEventHandler("TagPanel:TagAyarla", root, function(chat,olay) if olay == "Değiştir" then taglar[source] = chat outputChatBox("#FFFFFFTagın "..chat.." #FFFFFFolarak değiştirildi", source, 255,0,0, true) elseif olay == "Sıfırla" then taglar[source] = nil outputChatBox("#FFFFFFTagını başarıyla sıfırladın.", source, 255,0,0, true) end end)
  9. I tried and got this error "benim tag oldumu" ---->Chat writing
  10. function spamBlock(player,deger) -- spam blocking function local serial = getPlayerSerial(player) if value == "Mute" then outputChatBox(getPlayerName(player).."#CC0000 60 #FFFFFFSecond suspended. #CC0000Reason: #FFFFFFFlood/Spam", root, 255,255,255,true) setPlayerMuted(player, true) setTimer (spamBlock, 60000, 1, player, "Mute Remove") silenced[serial] = true elseif value == "Mute Remove" then if isElement (player) and isPlayerMuted (player) then setPlayerMuted ( player, false ) antiSpam[player] = nil silenced[serial] = false outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #66FF00Criminal its over.",root, 255, 255, 0,true ) else antiSpam[player] = nil end end end can you look again ?
  11. I did not understand.Do you want to add code
  12. function spamEngelle(player,deger) -- spam blocking function local serial = getPlayerSerial(player) if deger == "Mutele" then outputChatBox(getPlayerName(player).."#CC0000 60 #FFFFFFsecond suspended. #CC0000Reason: #FFFFFFFlood/Spam", root, 255,255,255,true) setPlayerMuted(player, true) setTimer (spamEngelle, 60000, 1, player, "Mute Kaldır") muteliler[serial] = true elseif deger == "Mute Kaldır" then if isElement (player) and isPlayerMuted (player) then setPlayerMuted ( player, false ) antiSpam[player] = nil muteliler[serial] = false outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #66FF00criminal its over.",root, 255, 255, 0,true ) else antiSpam[player] = nil end end end how can i fix the error ı have?
  13. What should I do ? function DrawLaser(player) if getElementData(player, "laser.on") then local targetself = getPedTarget(player) if targetself and targetself == player then targetself = true else targetself = false end if getElementData(player, "laser.aim") and IsPlayerWeaponValidForLaser(player) == true and targetself == false then local x,y,z = getPedWeaponMuzzlePosition(player) if not x then outputDebugString("getPedWeaponMuzzlePosition failed") x,y,z = getPedTargetStart(player) end local x2,y2,z2 = getPedTargetEnd(player) if not x2 then --outputDebugString("getPedTargetEnd failed") return end local x3,y3,z3 = getPedTargetCollision(player) local r,g,b,a = GetLaserColor(player) if x3 then -- collision detected, draw til collision and add a dot dxDrawLine3D(x,y,z,x3,y3,z3, tocolor(r,g,b,a), laserWidth) DrawLaserDot(player, x3,y3,z3) else dxDrawLine3D(x,y,z,x2,y2,z2, tocolor(r,g,b,a), laserWidth) ----641.dize DestroyLaserDot(player) end else DestroyLaserDot(player) end else DestroyLaserDot(player) end end
  14. What Should I DO ? function spamEngelle(oyuncu,deger) -- spam engelleme fonksiyon local serial = getPlayerSerial(oyuncu) if deger == "Mutele" then outputChatBox(getPlayerName(oyuncu).."#CC0000 60 #FFFFFFSaniye Susturuldun. #CC0000Sebep: #FFFFFFFlood/Spam", root, 255,255,255,true) setPlayerMuted(oyuncu, true) setTimer (spamEngelle, 60000, 1, oyuncu, "Mute Kaldır") muteliler[serial] = true elseif deger == "Mute Kaldır" then if isElement (oyuncu) and isPlayerMuted (oyuncu) then setPlayerMuted ( oyuncu, false ) antiSpam[oyuncu] = nil muteliler[serial] = false outputChatBox ("#FFFFFF"..getPlayerName ( oyuncu ).." #66FF00Cezan Bitti.",root, 255, 255, 0,true ) else antiSpam[oyuncu] = nil end end end
  15. what should I do ? local Veiculos = {507, 559,566,581,506,517,526} Drzika = {} function CreateVehicle (source) if getElementData (source, "Pegou", true) then outputChatBox ('#ccff33[BİLGİ] #0000ff30 #33ffffSaniye Sonra Yeniden Deneyin',source,255,255,255,true) return end if isElement(Drzika[source]) then destroyElement (Drzika[source]) Drzika[source] = nil end local x,y,z = getElementPosition (source) local Cars = Veiculos[math.random(#Veiculos)] Drzika[source] = createVehicle (Cars,x,y,z) warpPedIntoVehicle (source,Drzika[source]) setElementData (source, "Pegou",true) setTimer (setElementData, 30000, 1, source, "Pegou", false) end addCommandHandler ("car", CreateVehicle)
  16. I want to hand the cigarette. Smoking does not move with the hand .pls help
  17. function attach(thePlayer) local x, y, z = getElementPosition (thePlayer) cigar = createObject (3044, x, y, z) local cash = getPlayerMoney (thePlayer) if cash > 5000 then setElementData (thePlayer, "cig", false) exports.bone:attachElementToBone(cigar, thePlayer, 11, 0, 0.05, 0.27, 90, 90, 90) setPedAnimation (thePlayer, "SMOKING", "M_smklean_loop") outputChatBox ("Sigara İcmek 5000 TL.Almak icin /sigara .Biritmek icin /bitir", thePlayer, 0, 255, 0) takePlayerMoney (thePlayer, 5000) else outputChatBox ("Sigara icecek paran yok.", thePlayer, 255, 0, 0) end end addCommandHandler ("sigara", attach) function detach(thePlayer) destroyElement (cigar) setPedAnimation (thePlayer, false) end addCommandHandler ("bitir", detach) He is not taking the cigarette to his mouth .How can I hand over the cigarette?
  18. Color = {255,0,0} currentPosition = {} local Key = "0" local render = false GUIEditor = { combobox = {}, button = {}, edit = {}, label = {}, } System = {} itemTextCombobox = {"Arabic|العربية","English","Italiano","Français","Español"} local X, Y = guiGetScreenSize() System.wnd = guiCreateWindow(X-343, Y/2-269/2, 333, 269, ".:: [ Vehicle Marker Creator System ] ::.", false) guiSetVisible(System.wnd, not guiGetVisible(System.wnd)) guiWindowSetMovable(System.wnd, false) guiWindowSetSizable(System.wnd, false) guiSetAlpha(System.wnd, 1.00) guiSetProperty(System.wnd, "CaptionColour", "FF00D2F8") GUIEditor.label[1] = guiCreateLabel(7, 27, 415, 25, "Welcome To Vehicle Marker System ( =", false, System.wnd) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 248, 0, 0) GUIEditor.label[2] = guiCreateLabel(11, 59, 111, 25, "Position :", false, System.wnd) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 240, 237, 7) GUIEditor.label[3] = guiCreateLabel(11, 92, 118, 21, "x", false, System.wnd) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 99, 244, 2) GUIEditor.edit[1] = guiCreateEdit(9, 115, 130, 19, "", false, System.wnd) GUIEditor.label[4] = guiCreateLabel(10, 140, 118, 21, "y", false, System.wnd) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 99, 244, 2) GUIEditor.edit[2] = guiCreateEdit(10, 167, 130, 19, "", false, System.wnd) GUIEditor.label[5] = guiCreateLabel(10, 192, 118, 21, "z", false, System.wnd) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 99, 244, 2) GUIEditor.edit[3] = guiCreateEdit(10, 213, 130, 17, "", false, System.wnd) GUIEditor.label[6] = guiCreateLabel(148, 59, 125, 23, "Language :", false, System.wnd) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 241, 232, 4) GUIEditor.combobox[1] = guiCreateComboBox(148, 92, 171, 100, "", false, System.wnd) for i = 1, #itemTextCombobox do guiComboBoxAddItem(GUIEditor.combobox[1], itemTextCombobox[i]) end GUIEditor.button[1] = guiCreateButton(146, 129, 175, 22, "Get Position", false, System.wnd) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF5CF202") GUIEditor.button[2] = guiCreateButton(148, 161, 175, 22, "Set Marker Color", false, System.wnd) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF00ACF4") GUIEditor.button[3] = guiCreateButton(150, 202, 173, 22, "Create Marker", false, System.wnd) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFF40000") GUIEditor.button[4] = guiCreateButton(298, 21, 26, 29, "X", false, System.wnd) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFF40000") GUIEditor.label[7] = guiCreateLabel(9, 242, 322, 21, "Vehicle Marker Creator System v.2", false, System.wnd) guiSetFont(GUIEditor.label[7], "default-bold-small") guiLabelSetColor(GUIEditor.label[7], 30, 213, 207) for k, v in pairs( GUIEditor.edit ) do guiEditSetReadOnly( v, true ) end addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor.button[2] ) then openColorPicker() elseif ( source == GUIEditor.button[1] ) then local x,y,z = getElementPosition(localPlayer) guiSetText (GUIEditor.edit[1], x ) guiSetText (GUIEditor.edit[2], y ) guiSetText (GUIEditor.edit[3], z ) currentPosition = {x,y,z} elseif ( source == GUIEditor.button[3] ) then if #currentPosition == 0 then return end local send = { [1] = currentPosition[1], [2] = currentPosition[2], [3] = currentPosition[3], [4] = Color[1], [5] = Color[2], [6] = Color[3], } newPos = {} triggerServerEvent("CreateMarker", localPlayer, unpack(send)) elseif ( source == GUIEditor.button[4] ) then guiSetVisible(System.wnd, not guiGetVisible(System.wnd)) showCursor(guiGetVisible(System.wnd)) if render then openColorPicker() end end end ) addEventHandler ( "onClientGUIComboBoxAccepted", guiRoot, function ( combo ) if ( combo == GUIEditor.combobox[1] ) then local text = tostring ( guiComboBoxGetItemText ( combo, guiComboBoxGetSelected ( combo ) ) ) if ( text ) then local lang = AddLanguage( text ) for k, v in pairs ( lang ) do guiSetText( v.element, v.id) end end end end ) bindKey (Key, "down", function() if getElementData( localPlayer, 'OpenMakerPanel') ~= nil then guiSetVisible(System.wnd, not guiGetVisible(System.wnd)) showCursor(guiGetVisible(System.wnd)) if render then openColorPicker() end end end ) addEvent( 'LogOutSetVisible', true ) addEventHandler( 'LogOutSetVisible', root, function() if (guiGetVisible(System.Wnd) then -----133 guiSetVisible( System.Wnd, false ) showCursor( false ) end end) function openColorPicker() if render then colorPicker.closeSelect() removeEventHandler("onClientRender", root, updateColor) else colorPicker.openSelect() addEventHandler("onClientRender", root, updateColor) end render = not render end function updateColor() if (not colorPicker.isSelectOpen) then return end local r, g, b = colorPicker.updateTempColors() Color = {r,g,b} end Car marker cilent.lua I get out of the game and this error
  19. The error I get when I log out. :((( Pls Help me addEvent( 'LogOutSetVisible', true ) addEventHandler( 'LogOutSetVisible', root, function() if guiGetVisible(System.Wnd) then -----133 :( guiSetVisible( System.Wnd, false ) showCursor( false ) end end)
×
×
  • Create New...