ah doch geht sorry
Beiträge von HaPPySoNiC
-
-
Funzt nicht
-
Ahh, noch ne kleinigkeit! Wo kann ich ein Ban-system machen bzw. das übersetzen :P?
-
Ich hoff das wird bald bewantwortet
-
Okay, ich such auch mal nach dem fehler
Haste evtl auch ein fraktionsscript oder so :)? -
Hast du die gleiche bankresource wie ich oder eine andere? ich weiß net... kenne mich da ja noch net so aus vllt das mit dem export. irgendwas .. was hier schon erwähnt wurde.. muss jetzt aber off
-
hmmm immer noch ein error der andere is weg
attempt to perform arithmetic on local 'banksaldo' (a boolean value)
-
[2011-02-15 16:50:42] WARNING: PAYDAY!\welfare_payday.lua:13: Bad 'account' pointer @ 'getAccountName'(1)
[2011-02-15 16:50:42] ERROR: PAYDAY!\welfare_payday.lua:14: attempt to perform arithmetic on local 'banksaldo' (a boolean value) -
wow..
danke für die hilfe
werde das heute wieder mal nach der schule testen...
wie mach ich so fraktionen? also spawnpunkt usw. ändern.. läuft das über die acl oder sind das ganz normale teams? und wie mache ich das die z.B. polizei rot ist also im scoreboard:)wie gesagt 1000x mal dank =DD
-
Code
Alles anzeigenfunction allPlayersPayDay() local allPlayers = getElementsByType("player") for index,value in ipairs(allPlayers) do givePlayerMoney ( value, 500 ) outputChatBox ( "Payday! Du bekommst 5% Zinsen!", value ) local account = getBankAccountBalance(accountName) = (value) local money = getBankAccountBalance(accountName)*0.05 --Zinssatz 5% + setAccountData(account, "bank.balance", money) end end function onResourceStart(thisResource) setTimer ( allPlayersPayDay, 6000, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), onResourceStart )
habs jetzt so kommt immer noch der error mit dem callen muss ich noch üben sorry
-
so bekomme ein error
linie 6
unexpected symbol near '='was der fehler
vllt:
local account = getBankAccountBalance(accountName) == (value) ? mit 2 == -
Also, das ist der Payday : http://community.multitheftauto.com/index.php?p=re…=details&id=359
Das das Bank script http://community.multitheftauto.com/index.php?p=re…s=details&id=54 -
Was das Bank system oder welches weil das Bank system ist ein gedownloades da muss man nach LV z.B. um auf die bank einzuzahlen... bin grad in der schule ich setzt später mal nen link hier rein... um 16:00
-
Das ist es ja wie mache ich das im Script?
-
Doch Zinsrechnung hab ich gut drauf Weiß halt net wie ich formel und alles mache bin da noch extrem neu!
-
Spielstunden hinzufügen: Wiki-Suche: scoreboard
Teams wegmachen: Adminpanel, Config der Resourcen ändern
PayDay Zinsen: Formel und dann dem Geld hinzufügen?
Mit den Spielstunden habe ich jetzt leider nichts gefunden
Teams mache ich später
und Payday versteh ich nicht -
also sowas wie navicat? Aber der fügts dann trozdem net ein
-
Code
Alles anzeigen------------ -- Events -- ------------ 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 = getResourceConfig("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) return end else if tagMatch or aclGroupMatch then addPlayerToTeam(player,name) return end end end removePlayerFromTeam(player) setPlayerTeam(player,nil) 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 = FBI end setPlayerTeam(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 k,v in pairs(teams) do local team = v.team 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
So, gehts bei mir! Aber nach reconnect wird man nicht ins Team wiedereignefügt!
-
Ehm, hab jetzt was anderes... das Scoreboard! Wie mache ich Spielstuden? Und wie mache ich die teams weg? Möchte net das die da sind... möchte das die farbig sind oder so halt auf der playerlist, scoreboard egaal
und wie kann ich bei payday zinsen machen?
-
Bei mir gehts schon länger weiß jetzt nur net wie ich wenn ich z.B. was beim Autohändler kaufe das das dann in der DB ist... und ACHJA der erstellt die tabelle net