Jump to content

gokalpfirat

Members
  • Posts

    314
  • Joined

  • Last visited

Everything posted by gokalpfirat

  1. Because some of textures of parts are missing. Maybe you should import petro2.txd
  2. WTF this is the 4th topic I will answer. You want to do all things but you cant becuase you dont know anything and you create a topic at there and waiting for someone to do. TAPL answer shows anything.
  3. guiSetProperty(bEditChar,NormalTextColour,#87F717) I dont use color too much and I think this wont work.
  4. I think you dont know lua and you take this code at a script. If you want give random money use this function givePlayerMoney( source, math.random(1,600) )
  5. function gpos (source,cmd,x,y,z) x = tonumber(x) y = tonumber(y) z = tonumber(z) setElementPosition(source,x,y,z) end addCommandHandler("gotopos",gpos)
  6. viewtopic.php?f=91&t=46805&p=465558&hilit=removeWorldModel#p465558
  7. TXD file hasnt got some textures of model parts.
  8. Sorry but now i see it doesnt work. Like the old clan and there is a new clan that i made. When I restart script old clan member go to his clan but new clan member didnt.
  9. Nope but it isnt inserting too?
  10. I dont know but when I use command it says in debug script "You can create an acc"
  11. handler = mysql_connect("localhost", "root", "ankara", "mtaturk") -- Establish the connection if ( not handler ) then -- The connection failed outputDebugString("Unable to connect to the MySQL server") else outputDebugString("Connected") end function kayit(player,cmd,name1,pass) name1 = tostring(name1) c1 = mysql_query(handler, "SELECT Name FROM users WHERE Name='"..name1.."'") if (c1 == true) then outputDebugString("Name already exist") else outputDebugString("You can create an acc") reg = mysql_query(handler, "INSERT INTO users(Name,Pass,Para,Puan) VALUES('"..name1.."', '"..pass.."', 0, 0 ") end mysql_free_result(c1) end addCommandHandler("kayit",kayit) This is my script I connect my mysql but when I "kayit" command I cant add accound.
  12. Thanks Solidsnake14 It works
  13. ------------ -- Events -- ------------ function moveOnStart() check(source) end addEventHandler("onResourceStart",getRootElement(),moveOnStart) function playerJoined() check(source) end addEventHandler("onPlayerJoin",getRootElement(),playerJoined) function playerChangedNick(oldNick,newNick) -- Use timer to wait until the nick really has changed setTimer(check,1000,1,source) end addEventHandler("onPlayerChangeNick",getRootElement(),playerChangedNick) function playerQuit() removePlayerFromTeam(source) end addEventHandler("onPlayerQuit",getRootElement(),playerQuit) -- Check for ACL Groups on login/logout function loggedIn() check(source) end addEventHandler("onPlayerLogin",getRootElement(),loggedIn) function loggedOut() check(source) end addEventHandler("onPlayerLogout",getRootElement(),loggedOut) -- Holds the teams as defined in the settings local teams = {} --- -- Reads the settings and creates the teams if enabled. -- function initiate() local rootNode = xmlLoadFile("config.xml") local children = xmlNodeGetChildren(rootNode) if children == false then return end for _,node in pairs(children) do local attributes = xmlNodeGetAttributes(node) local name = attributes.name local color = {getColorFromString(attributes.color)} if not color[1] then color = {255,255,255} end teams[name] = attributes teams[name].color = color if not toboolean(get("noEmptyTeams")) then teams[name].team = createTeam(name,unpack(color)) end end for k,v in pairs(getElementsByType("player")) do check(v) end end addEventHandler("onResourceStart",getResourceRootElement(),initiate) --------------- -- Functions -- --------------- --- -- Checks the player's nick and ACL Groups and sets his team if necessary. -- -- @param player player: The player element -- function check(player) if not isElement(player) or getElementType(player) ~= "player" then debug("No player") return end local nick = getPlayerName(player) local accountName = getAccountName(getPlayerAccount(player)) for name,data in pairs(teams) do local tagMatch = false local aclGroupMatch = false if data.tag ~= nil and string.find(nick,data.tag,1,true) then tagMatch = true end if data.aclGroup ~= nil and accountName and isObjectInACLGroup("user."..accountName,aclGetGroup(data.aclGroup)) then aclGroupMatch = true end if data.required == "both" then if tagMatch and aclGroupMatch then addPlayerToTeam(player,name) setTimer(check2, 500, 1) return end else if tagMatch or aclGroupMatch then addPlayerToTeam(player,name) setTimer(check2, 500, 1) return end end end removePlayerFromTeam(player) setPlayerTeam(player,nil) setTimer(check2, 500, 1) end function check2() if toboolean(get("noEmptyTeams")) then for i,v in pairs(teams) do team2 = teams[i].name team = getTeamFromName(teams[i].name) if isElement(team) and getElementType(team) == "team" then if countPlayersInTeam(team) == 0 then debug("Removed team '" .. tostring(team2) .. "' since it has no players") destroyElement(team) end end end end end --- -- Adds a player to the team appropriate for the name. -- It is not checked if the team is really defined in the table, since -- it should only be called if it is. -- -- Creates the team if it doesn't exist. -- -- @param player player: The player element -- @param string name: The name of the team -- function addPlayerToTeam(player,name) local team = teams[name].team if not isElement(team) or getElementType(team) ~= "team" then team = createTeam(teams[name].name,unpack(teams[name].color)) teams[name].team = team end setTimer(setPlayerTeam, 500, 1, player, team) debug("Added player '"..getPlayerName(player).."' to team '"..name.."'") end --- -- Removes a player from a team. Also checks if any team -- needs to be removed. -- -- @param player player: The player element -- function removePlayerFromTeam(player) setPlayerTeam(player, nil) debug("Removed player '"..getPlayerName(player).."' from team") --[[if toboolean(get("noEmptyTeams")) then for i,v in pairs(teams) do team = getTeamFromName(teams[i].name) if isElement(team) and getElementType(team) == "team" then if countPlayersInTeam(team) == 0 then destroyElement(team) end end end end]] end --- -- Converts a string-boolean into a boolean. -- -- @param string string: The string (e.g. "false") -- @return true/false Returns false if the string is "false" or evaluates to false (nil/false), true otherwise -- function toboolean(string) if string == "false" or not string then return false end return true end ----------- -- Debug -- ----------- -- Little debug function to turn on/off debug setElementData(getResourceRootElement(),"debug",true) function debug(string) if getElementData(getResourceRootElement(),"debug") then outputDebugString("autoteams: "..string) end end This is the script that I found it in community. I tried to add something but I cant do. I at onResource start to check but it is still doesnt check. Like when I add clan and restart script all clans gone down and when they reconnect or change their nickname then they move to clan. But I want to go their clan when I start script. I tried a onResourceStart event like you see in code but it doesnt works.
  14. Ok I resolved it when i upload old resources it works.
  15. This will cause when I update it
  16. Nope I have maps. And I have got 2 servers and when I update my resources this happened maybe if I install old resources.
  17. gokalpfirat

    Need help

    I have same error debugscript is: ERROR: admin/gui/admin_maps.lua:37:attempt to concatenate local 'map' (a nil value) Resolved: Upload old resources.
  18. Hi I cant see my maps at admin panel! I get this error at debugscript. ERROR: admin/gui/admin_maps.lua:37:attempt to concatenate local 'map' (a nil value)
  19. The page is made my MTA developers ?
  20. Hi guys, Today I want to go https://nightly.multitheftauto.com/ but i write wrong and get there http://nigtly.mtasa.com/ and I see a flash scripted page look the page please
×
×
  • Create New...