Jump to content

freudo

Members
  • Posts

    159
  • Joined

  • Last visited

Everything posted by freudo

  1. Yes Yes all things have. I select a color code on colorpicker but not changing bitti color
  2. Hey I have this code this code only destroy localplayer clan I want /removeallclans Remove the all clans xml Code: function clanKapat() local myacc = getPlayerAccount(source) local kurucu = getAccountData(myacc,"clankurucu") local tag = getAccountData(myacc,"clan") local isim for _,v in ipairs(clans) do if v.tag == tag then isim = v.isim break end end if tonumber(kurucu) ~= 1 then outputChatBox("#31cccc* Clanı kapatmak için clan kurucusu olmalısınız.",source,255,0,true) else local xmlFile = xmlLoadFile("clans.xml") local c = 0 while xmlFindChild(xmlFile,"clan",c) do local node = xmlFindChild(xmlFile,"clan",c) local tags = xmlNodeGetAttribute(node,"tag") if tags == tag then xmlDestroyNode(node) break end c=c+1 end xmlSaveFile(xmlFile) -- local p for _,v in ipairs(getAccounts()) do if getAccountData(v,"clan")==tag then setAccountData(v,"clan","0") setAccountData(v,"clankurucu","0") setAccountData(v,"clanyetkili","0") p = getAccountPlayer(v) if p then setPlayerTeam(p,nil) end end end outputChatBox("#31cccc*#ff3333 "..tag.." "..isim.." #31ccccadlı clan kapatılmıştır.",getRootElement(),255,0,0,true) for k,v in ipairs(clans) do if v.tag == tag then destroyElement(v.team) table.remove(clans,k) end end triggerClientEvent(source,"clanPanelCikisYap",source) end end addEvent("clanKapat",true) addEventHandler("clanKapat",getRootElement(),clanKapat)
  3. Hey Not saving nitro color. and I select a color not changing color Client: --------------------------------------------------------------------------------- -- -- Nitro shader -- -- --------------------------------------------------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() nitroShader = dxCreateShader("nitro.fx") setTimer(updateNitroColor,1000,1,255,0,0) end) -- This function will set the new color of the nitro function updateNitroColor(r,g,b) if nitroShader then if r and g and b then engineApplyShaderToWorldTexture (nitroShader,"smoke") dxSetShaderValue (nitroShader, "gNitroColor", r/255, g/0, b/0 ) end end end -- This function will reset the nitro back to the original function resetNitroColor() if nitroShader then engineRemoveShaderFromWorldTexture(nitroShader,"smoke") end end function nitro () openPicker ( "nitrorenk", "#FFFFFF", "Nitro rengi" ) end addCommandHandler("nitro", nitro) addEvent ( "onColorPickerOK", true ) addEventHandler ( "onColorPickerOK", root, function ( id, hex, r, g, b ) if ( id == "nitrorenk" ) then updateNitroColor(r,g,b) end end )
  4. How to I create DB? And how to I insert or update playername and wins ?
  5. I create db executeSQLQuery("CREATE TABLE IF NOT EXİSTS mapwins (mapname TEXT, playername TEXT,wins INTEGER)") How to I insert or update when player win map.
  6. I want create SQL top players data in map. Who help me? Example: [DD]Cross XL 1. barikat 2wins 2.sky 1wins etc..
  7. I have one more question How to I change my clan color change? Client: function renkDegstr(btn) if btn == "left" then local color = guiGetText(renkedit) local r,g,b = getColorFromString(color) triggerServerEvent("updateColor",localPlayer,{renk=color,r=r,g=g,b=b}) end end Sever: Dont work addEvent("updateColor",true) addEventHandler("updateColor",root, function(color) local myClan = getAccountData(getPlayerAccount(source),"clan") if myClan then local xml = xmlLoadFile("clans.xml") if xml then for k,v in ipairs(xmlNodeGetChildren(xml)) do if xmlNodeGetAttribute(v, "tag") == myClan then xmlNodeSetAttribute(v,"r",color.r) xmlNodeSetAttribute(v,"g",color.g) xmlNodeSetAttribute(v,"b",color.b) xmlNodeSetAttribute(v,"color",color.renk) break end end end end end )
  8. İ want set 0 value for all clans
  9. hi I Want change all clan points set to 0 with command Exp: /cpremove "Number One" tag="~¨~" r="102" g="102" b="102" color="#666666" Points="4" "SR" tag="[sR]" r="102" g="102" b="102" color="#666666" Points="5"
  10. This line error;6 for i,v in ipairs(data) do function initSQLTable(tab, data) local ctab = executeSQLQuery("SELECT sql FROM sqlite_master WHERE type='table' AND name=?", tab)[1] if ctab then local qs = {} for i,v in ipairs(data) do local n, t, d = unpack(v) if not string.find(ctab.sql, n) then if t and d then d = "'" .. d .. "'" end local qc = "ALTER TABLE ? ADD COLUMN " .. n .. " " if t then qc = qc .. "TEXT" else qc = qc .. "INTEGER" end if d then qc = qc .. " DEFAULT " .. d .. " NOT NULL" end table.insert(qs, qc) end end for i,v in ipairs(qs) do executeSQLQuery(v, tab) end else local query = "CREATE TABLE IF NOT EXISTS ? (" for i,v in ipairs(data) do local n, t, d = unpack(v) if t and d then d = "'" .. d .. "'" end local qc = n .. " " if t then qc = qc .. "TEXT" else qc = qc .. "INTEGER" end if d then qc = qc .. " DEFAULT " .. d .. " NOT NULL" end if i ~= 1 then qc = ", " .. qc end query = query .. qc end query = query .. " )" executeSQLQuery(query, tab) outputDebugString(query) end end function addSQLRow(tab, data) local rowsstr = "" local valsstr = "" local vals = {} local i = 1 for k,v in pairs(data) do if i ~= 1 then rowsstr = rowsstr .. "," valsstr = valsstr .. "," end rowsstr = rowsstr .. k valsstr = valsstr .. "?" table.insert(vals, v) i = i + 1 end executeSQLQuery("INSERT INTO ? (" .. rowsstr .. ") VALUES (" .. valsstr .. ")", tab, unpack(vals)) end
  11. Look this pictures; Please click pictures right click and open new tab
  12. Yes, I want to change out of the game. I add guiEdit and button. function coDevamRenk(btn) if btn == "left" then local renk = guiGetText(renkedit) local r,g,b = getColorFromString(renk) triggerServerEvent("clanColor",getLocalPlayer(),renk,tostring(r),tostring(g),tostring(b)) -- I cant create color changer function. end end
  13. This is team create function function clanKur(isim,tag,renk,r,g,b) local acc = getPlayerAccount(source) local cash = tonumber(getAccountData(acc,"cash")) local clan = getAccountData(acc,"clan") if clan ~= "0" then outputChatBox("Clandan ayrilmadan clan kuramazsiniz.",source,255,0,0,true) else local ic = 0 local tc = 0 for _,v in ipairs(clans) do if tostring(v.isim) == tostring(isim) then ic=1 end if tostring(v.tag) == tostring(tag) then tc=1 end end if ic == 1 then triggerClientEvent(source,"addNotification",getRootElement(),"Böyle bir clan ismi kullanılmakta!", 2) elseif tc==1 then triggerClientEvent(source,"addNotification",getRootElement(),"Böyle bir clan tagı kullanılmakta!", 2) else if cash >= ClanParaAlc then local xml = xmlLoadFile("clans.xml") local node = xmlCreateChild(xml,"clan") xmlNodeSetAttribute(node,"isim",isim) xmlNodeSetAttribute(node,"tag",tag) xmlNodeSetAttribute(node,"r",r) xmlNodeSetAttribute(node,"g",g) xmlNodeSetAttribute(node,"b",b) xmlNodeSetAttribute(node,"color",renk) setAccountData(acc, "money", cash-ClanParaAlc) setAccountData(acc,"clan",tag) setAccountData(acc,"clankurucu","1") setAccountData(acc,"clanyetkili","1") xmlSaveFile(xml) outputChatBox("#31cccc* "..getPlayerName(source).." #31ccccadlı oyuncu #ff3333"..tag.." "..isim.." #31ccccclanını kurdu.",getRootElement(),0,255,0,true) triggerClientEvent(source,"addNotification",getRootElement(),isim.. " adlı klan başarıyla kuruldu!", 1) triggerClientEvent(source,"clanKapat",source) local team = createTeam(tostring(isim),tonumber(r),tonumber(g),tonumber(b)) table.insert ( clans,{["tag"]=tostring(tag),["isim"]=tostring(isim),["r"]=tonumber(r),["g"]=tonumber(g),["b"]=tonumber(b),["team"]=team}) setPlayerTeam(source,team) else outputChatBox("You dont have money",source,255,0,0,true) end end end end addEvent("clanKur",true) addEventHandler("clanKur",getRootElement(),clanKur) How to I add team color changer function? Can you help me?
  14. How to I send Last 2 alive players to client side on race gm? Example: dxDrawText(getPlayerName(player[1].." "..getPlayerName(player[2]
  15. Hi guys, I have a problem how to ı send last 2 players to client? Picture: codes: server if #activePlayers == 1 then self.rankingBoard:add(activePlayers[1], timePassed) --clientCall(getRootElement(),"onWins", activePlayers[1]) triggerClientEvent("onWins", getRootElement(), activePlayers[1]) triggerEvent("onPlayerDestructionDerbyWin", getRootElement(), activePlayers[1]) end if #activePlayers == 2 then triggerClientEvent("onWins2", getRootElement(), activePlayers[2]) end activePlayer[1]= client: addEvent("onWins", true) function drawNexMapString(player) local r,g,b = 255,255,255 local team = getPlayerTeam(player) if team then r,g,b = getTeamColor(team) end ganador=player ancho=300 alto=y/12 fontAlto = dxGetFontHeight(2,"default-bold") alpha=200 start2 = getTickCount() addEventHandler("onClientRender",getRootElement(),renderWin) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),renderWin) end, 8000, 1 ) --winner = dxText:create(""..getPlayerNametagText(player).." #ffffffEs El #99ff00Ganador", x / 2, y / 2 - 10 + 75 - 41, false, "default-bold", 1, "center") --nextmap = dxText:create( "#333333C#FFFFFFerrando #333333M#FFFFFFensage #333333e#FFFFFFn:", x / 2, y / 2 - 10 + 75 + 11, false, "default-bold", 1, "center") end addEventHandler("onWins", getRootElement(), drawNexMapString) activePlayer[2]= addEvent("onWins2", true) function drawNexMapStrings(player) local r,g,b = 255,255,255 local team = getPlayerTeam(player) if team then r,g,b = getTeamColor(team) end ganador2=player ancho=300 alto=y/12 fontAlto = dxGetFontHeight(2,"default-bold") alpha=200 start2 = getTickCount() addEventHandler("onClientRender",getRootElement(),renderWin2) setTimer ( function() removeEventHandler("onClientRender",getRootElement(),renderWin2) end, 5000, 1 ) --winner = dxText:create(""..getPlayerNametagText(player).." #ffffffEs El #99ff00Ganador", x / 2, y / 2 - 10 + 75 - 41, false, "default-bold", 1, "center") --nextmap = dxText:create( "#333333C#FFFFFFerrando #333333M#FFFFFFensage #333333e#FFFFFFn:", x / 2, y / 2 - 10 + 75 + 11, false, "default-bold", 1, "center") end addEventHandler("onWins2", getRootElement(), drawNexMapStrings)
  16. hİ GUYS, I have killer script for race mode. And Player collision to other player and error this Please help me
  17. hey I want to add scoreboard column 2 data example: Level 11[2.] -- 2. rank 11 level ı want example
×
×
  • Create New...