freudo
Members-
Posts
159 -
Joined
-
Last visited
Everything posted by freudo
-
DjKim = guiCreateLabel(0.49, 0.81, 0.20, 0.03, "DJ:", true) guiSetText(DjKim, getPlayerName(source)) or DjKim = guiCreateLabel(0.49, 0.81, 0.20, 0.03, "DJ:", true) guiSetText(DjKim, getPlayerFromName(source))
-
Nice script but, I don't like your design.you can make a new design.
-
AM LIFE HE DIDN'T FINISH BUT FINISHED THE GAME.
freudo replied to -ffn-python's topic in General Multi Language discussion
What is your problem? -
When player reconnect and unmuted players addEventHandler("onPlayerChangeNick",root, function() if isPlayerMuted(source) then cancelEvent() outputChatBox("#31ccccMuteli olduğun için nick değiştiremessin!",source,255,0,0,true) end end)
-
Hey, I'm selling my DD server scripts, - Deathlist killer - Topmap wins - Level system [sql System] Skype: virtue.sword [/b]
-
I need help 283. line : destroyElement(v.team) function refreshClans() if #clans>0 then for _,v in ipairs(clans) do destroyElement(v.team) end end clans = {} local xmlClan = xmlLoadFile("clans.xml") local c = 0 local child local tag,isim,r,g,b,team while xmlFindChild(xmlClan,"clan",c) do child = xmlFindChild(xmlClan,"clan",c) tag = xmlNodeGetAttribute(child,"tag") isim = xmlNodeGetAttribute(child,"isim") r = xmlNodeGetAttribute(child,"r") g = xmlNodeGetAttribute(child,"g") b = xmlNodeGetAttribute(child,"b") 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}) c=c+1 end local acc for _,v in ipairs(clans) do for _,player in ipairs(getElementsByType("player")) do acc = getPlayerAccount(player) if not isGuestAccount(acc) then if getAccountData(acc,"clan") == v.tag then setPlayerTeam(player,v.team) end end end end local count=0 for _,v in ipairs(clans) do count=0 for _,z in ipairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(z)) then if tostring(getAccountData(getPlayerAccount(z),"clan")) == tostring(v.tag) then count=1 break end end end if count ~= 1 then destroyElement(v.team) end count=0 end end
-
function ff() local pTeam = getPlayerTeam(source) local kTeam = getPlayerTeam(killer) if pTeam == kTeam then outputChatBox("You killed your team player",killer,255,0,0,true) end end Thanks , I trying
-
İts true this? local pTeam = getPlayerTeam(source) local kTeam = getPlayerTeam(killer) if pTeam ~= kTeam then
-
help please! İts true? function ff() local pTeam = getPlayerTeam(source) local kTeam = getPlayerTeam(killer) if pTeam ~= kTeam then outputChatBox("You killed your team player",killer,255,0,0,true) end end
-
MTA'dan Ban yedim nasıl açtırabilirim bilmediğim birşey yüzünden neden ban yiyorum üstelik sınırsız. Şu konuya bi el atsanızda açtırsanız. viewtopic.php?f=104&t=88958
-
No error, just chatbox saying "Error"
-
Same Command this ? /rd playerName 0.00.000.00 00000
-
Not working code: function redirectPlayer(thePlayer, commandName,targetPlayer, serverIP, serverPort) local playername = getPlayerName(thePlayer) if playername and targetPlayer and serverIP and serverPort then local targetPlayer = findPlayerByName(targetPlayer) redirectPlayer(targetPlayer,serverIP,tonumber(serverPort)) else outputChatBox("Error",source,255,0,0,true) end end addCommandHandler("rd",redirectPlayer) function findPlayerByName(name) local player = getPlayerFromName(name) if player then return player end for i, player in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(player):lower(),"#%x%x%x%x%x%x", ""), name:lower(), 1, true) then return player end end return false end
-
I have only account rank system How to I change to SQL function getAllRankSB() local tableOrder = { } for i, v in ipairs ( getAccounts ( ) ) do table.insert ( tableOrder, { name = getAccountName(v), data = getAccountData ( v, "experiencet" ) } ) end table.sort ( tableOrder, function ( a, b ) return ( tonumber ( a.data ) or 0 ) > ( tonumber ( b.data ) or 0 ) end ) for i,player in pairs(getElementsByType("player")) do if not (isGuestAccount(getPlayerAccount(player))) then for i=1,#tableOrder do if tableOrder[i].name == getAccountName(getPlayerAccount(player)) then setElementData(player,"Sıra",i) end end end end outputDebugString("Updating rank for all player") end setTimer(function() getAllRankSB() end,300000,0)
-
Hey I want ranking players for experience. Example: Scoreboard exam: playername experience rank barikat 25000 1. skyturk 12055 2. Can you help me? Example codes: Checking experience function getPlayerExperiencet(thePlayer) local handler = connection if (isElement(thePlayer) and getElementType(thePlayer) == "player") then account = getPlayerAccount(thePlayer) else account = thePlayer end if (not account or isGuestAccount(account)) then return false end local accountName = getAccountName(account) local query = dbQuery( handler, "SELECT experiencet FROM `levels` WHERE accountName='".. tostring(accountName) .."'") local result, numrows, errmsg = dbPoll( query, -1 ) if (result) then return tonumber(result[1]["experiencet"]) end end
-
I try its working destroy clan but How to delete clans table ?
-
addEventHandler ( "removeallclans", root, This line addCommandHandler("removeallclans", ??
-
Yes Yes all things have. I select a color code on colorpicker but not changing bitti color
-
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)
-
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 )
-
How to I create DB? And how to I insert or update playername and wins ?
-
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.
