Ahh ja dann Wenn er nix besseres zu tun hat
Beiträge von StiviK
-
-
Danke für deine hilfe! *love* *love* *love* *love*
-
Geil das funktioniert!
-
Futoro: Das Funktioniert nicht
-
Problem gelöst!
(facepalm)
Ich hab das Script Clientseitig eingetragen
"<script src="map/Info/InfoVarriable.lua" type="client" />" -
-
Herbert: was bewirkt das jetzt?
Ich wollte das für die playerlist -
Hamm shit... Kann man das umgehen?
//Edit
Stimmt /Nick lässt vio auch nicht zu.. -
Ich schau später
-
Hmmm.... Passiert nix! Mein Angezeigter Name wird nicht geändert ....
-
Heyho,
Ich habe ein Problem mit meinem Script! Es hat immer funktioniert bis ich den Server einmal restartet habe! Und jetzt kommt immer in debugscript 3 "6: attempt to call global 'MySQL_GetString' (a niv value) Könnt ihr mir helfen das Problem zu beheben?
Lua
Alles anzeigen--- StiviK ---- HausStiviKID = "38" StiviKArea = createRadarArea ( 1003.892, -372.4315, 110, 105, 250, 0, 0, 200 ) StiviKArea2 = createRadarArea ( 1003.829, -456.0585, 40, 85, 250, 0, 0, 200 ) TutInfoPoint1 = createPickup(1105.8974609375, -301.64474487305, 74, 3, 1239) BesitzerHausStiviK = MySQL_GetString( "houses", "Besitzer", "ID LIKE '"..HausStiviKID.."'" ) PreisHausStiviK = MySQL_GetString( "houses", "Preis", "ID LIKE '"..HausStiviKID.."'" ) ZeitHausStiviK = MySQL_GetString( "houses", "Mindestzeit", "ID LIKE '"..HausStiviKID.."'" ) --- ApfelKuchen --- HausApfelID = "249" BesitzerHausApfel = MySQL_GetString( "houses", "Besitzer", "ID LIKE '"..HausApfelID.."'" ) PreisHausApfel = MySQL_GetString( "houses", "Preis", "ID LIKE '"..HausApfelID.."'" ) ZeitHausApfel = MySQL_GetString( "houses", "Mindestzeit", "ID LIKE '"..HausApfelID.."'" ) --- Pino_1987 --- HausPinoID = "248" BesitzerHausPino = MySQL_GetString( "houses", "Besitzer", "ID LIKE '"..HausPinoID.."'" ) PreisHausPino = MySQL_GetString( "houses", "Preis", "ID LIKE '"..HausPinoID.."'" ) ZeitHausPino = MySQL_GetString( "houses", "Mindestzeit", "ID LIKE '"..HausPinoID.."'" ) local function update ( player ) BesitzerHausStiviK = MySQL_GetString( "houses", "Besitzer", "ID LIKE '"..HausStiviKID.."'" ) PreisHausStiviK = MySQL_GetString( "houses", "Preis", "ID LIKE '"..HausStiviKID.."'" ) ZeitHausStiviK = MySQL_GetString( "houses", "Mindestzeit", "ID LIKE '"..HausStiviKID.."'" ) BesitzerHausApfel = MySQL_GetString( "houses", "Besitzer", "ID LIKE '"..HausApfelID.."'" ) PreisHausApfel = MySQL_GetString( "houses", "Preis", "ID LIKE '"..HausApfelID.."'" ) ZeitHausApfel = MySQL_GetString( "houses", "Mindestzeit", "ID LIKE '"..HausApfelID.."'" ) BesitzerHausPino = MySQL_GetString( "houses", "Besitzer", "ID LIKE '"..HausPinoID.."'" ) PreisHausPino = MySQL_GetString( "houses", "Preis", "ID LIKE '"..HausPinoID.."'" ) ZeitHausPino = MySQL_GetString( "houses", "Mindestzeit", "ID LIKE '"..HausPinoID.."'" ) end function TutInfoPoint ( player ) if (BesitzerHausStiviK == "none") then outputChatBox("@ALL: Bei Kauf bitte /update!", player, 0, 100, 0) else outputChatBox("@"..BesitzerHausStiviK..": Bei Verkauf bitte /update!", player, 0, 100, 0) end cancelEvent() end addCommandHandler("update", update ) addEventHandler ("onPickupHit", TutInfoPoint1, TutInfoPoint)
-
'then' expectet near '='
Steht in debugscript 3
-
Ich hab es schon versucht zu überarbeiten hab es aber nicht hinbekommen
-
Hmm.... weis jetz nich!
Kann das daran liegen, dass in LastAttackt "0000-00-00 00:00:00" steht?
-
Ich will eig das es immer mit dem Zeit System Attackbar ist!
-
Heyho,
Ich habe ein Problem! Und zwar beim Gangwar bei dem Marker läuft die Zeit mit der Aktuellen Zeit mit! Kann mir einer helfen das zu fixen?
Spoiler anzeigen
Lua
Alles anzeigenfunction createGangAreas ( ) local result = mysql_query( handler, "SELECT * FROM gangs" ) if ( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) return end local dsatz = mysql_fetch_assoc( result ) while ( dsatz ) do local ID = dsatz["Nummer"] local XS = math.abs( dsatz["X1"] - dsatz["X2"] ) local YS = math.abs( dsatz["Y1"] - dsatz["Y2"] ) local Besitzer = tonumber(dsatz["BesitzerFraktion"]) local r, g, b = gangColor[Besitzer][1], gangColor[Besitzer][2], gangColor[Besitzer][3] _G["gangArea"..ID] = createRadarArea ( dsatz["X1"], dsatz["Y1"], XS, YS, r, g, b, 200, getRootElement() ) _G["gangPickup"..ID] = createPickup ( dsatz["X3"], dsatz["Y3"], dsatz["Z3"], 3, 1313, 1, 9999 ) vioSetElementData ( _G["gangPickup"..ID], "gang", Besitzer ) vioSetElementData ( _G["gangPickup"..ID], "id", ID ) vioSetElementData ( _G["gangPickup"..ID], "einnahmen", dsatz["Einnahmen"] ) vioSetElementData ( _G["gangPickup"..ID], "isUnderAttack", false ) vioSetElementData ( _G["gangPickup"..ID], "lastAttacked", dsatz["LastAttacked"] ) addEventHandler ( "onPickupHit", _G["gangPickup"..ID], function ( hit ) if getElementType(hit) ~= "player" then return end outputChatBox ( "Dieses Ganggebiet gehoert: "..gangName[vioGetElementData( source, "gang" )], hit, 125, 125, 200 ) if areaTexts[vioGetElementData( source, "id" )] then bonus = "1 "..areaTexts [vioGetElementData( source, "id" )].." / 20 Minuten" else bonus = "-" end outputChatBox ( "Einnahmen/Stunde: "..( vioGetElementData ( source, "einnahmen" ) * 12 )..", Sonstige Boni: "..bonus, hit, 125, 125, 200 ) local fraktion = vioGetElementData ( hit, "fraktion" ) local time = getRealTime( tonumber( vioGetElementData( source, "lastAttacked" ) ) ) local str = time.monthday.."."..( tonumber(time.month) + 1 ).."."..(tonumber(time.year)+1900).." um "..time.hour..":"..time.minute..":"..time.second.." Uhr" outputChatBox ( "Naechster Attack moeglich am "..str.."!", hit, 125, 0, 0 ) if vioGetElementData ( hit, "rang" ) >= 3 and validGangs[fraktion] then outputChatBox ( "Tippe /attack, um einen Angriff zu starten!", hit, 125, 0, 0 ) end end ) dsatz = mysql_fetch_assoc ( result ) end mysql_free_result ( result ) end addEventHandler ( "onResourceStart", resourceRoot, createGangAreas ) --[[function createGangAreas () local gangCounter = 1 local Besitzer = tonumber ( MySQL_GetString("gangs", "BesitzerFraktion", "Nummer LIKE '" ..gangCounter.."'") ) while true do local Besitzer = tonumber ( MySQL_GetString("gangs", "BesitzerFraktion", "Nummer LIKE '" ..gangCounter.."'") ) if Besitzer then local Einnahmen = MySQL_GetString("gangs", "Einnahmen", "Nummer LIKE '" ..tonumber(gangCounter).."'") local X1 = MySQL_GetString("gangs", "X1", "Nummer LIKE '" ..tonumber(gangCounter).."'") local Y1 = MySQL_GetString("gangs", "Y1", "Nummer LIKE '" ..tonumber(gangCounter).."'") local X2 = MySQL_GetString("gangs", "X2", "Nummer LIKE '" ..tonumber(gangCounter).."'") local Y2 = MySQL_GetString("gangs", "Y2", "Nummer LIKE '" ..tonumber(gangCounter).."'") local XS = math.abs(X1-X2) local YS = math.abs(Y1-Y2) local X3 = MySQL_GetString("gangs", "X3", "Nummer LIKE '" ..tonumber(gangCounter).."'") local Y3 = MySQL_GetString("gangs", "Y3", "Nummer LIKE '" ..tonumber(gangCounter).."'") local Z3 = MySQL_GetString("gangs", "Z3", "Nummer LIKE '" ..tonumber(gangCounter).."'") local Einnahmen = MySQL_GetString("gangs", "Einnahmen", "Nummer LIKE '" ..tonumber(gangCounter).."'") local r = gangColor[Besitzer][1] local g = gangColor[Besitzer][2] local b = gangColor[Besitzer][3] local lastAttacked = MySQL_GetString("gangs", "LastAttacked", "Nummer LIKE '" ..tonumber(gangCounter).."'") _G["gangArea"..gangCounter] = createRadarArea ( X1, Y1, XS, YS, r, g, b, 200, getRootElement() ) _G["gangPickup"..gangCounter] = createPickup ( X3, Y3, Z3, 3, 1313, 1, 9999 ) vioSetElementData ( _G["gangPickup"..gangCounter], "gang", Besitzer ) vioSetElementData ( _G["gangPickup"..gangCounter], "id", gangCounter ) vioSetElementData ( _G["gangPickup"..gangCounter], "einnahmen", Einnahmen ) vioSetElementData ( _G["gangPickup"..gangCounter], "isUnderAttack", false ) vioSetElementData ( _G["gangPickup"..gangCounter], "lastAttacked", lastAttacked ) addEventHandler ( "onPickupHit", _G["gangPickup"..gangCounter], gangPickupHit ) gangCounter = gangCounter + 1 else break end end setTimer ( gangAreaBoni, 20*60*1000, -1 ) setTimer ( gangAreaEinnahmen, 5*60*1000, -1 ) end]] function gangAreaBoni () for i = 1, gangCount do local pickup = _G["gangPickup"..i] local owner = vioGetElementData ( pickup, "gang" ) if validGangs[owner] then local id = vioGetElementData ( pickup, "id" ) if areaTexts[id] then if id == 3 then local gang = 0 factionDepotData["drugs"][owner] = factionDepotData["drugs"][owner] + 5 local drugs = factionDepotData["drugs"][owner] MySQL_SetString("fraktionen", "DepotDrogen", drugs, "id = '"..owner.."'") elseif id == 6 then factionDepotData["mats"][owner] = factionDepotData["mats"][owner] + 2 local mats = factionDepotData["mats"][owner] MySQL_SetString("fraktionen", "DepotMaterials", mats, "id = '"..owner.."'") elseif id == 7 then local gang = 0 if gang then factionDepotData["mats"][owner] = factionDepotData["mats"][owner] + 2 local mats = factionDepotData["mats"][owner] MySQL_SetString("fraktionen", "DepotMaterials", mats, "id = '"..owner.."'") end elseif id == 8 then local gang = 0 if gang then factionDepotData["mats"][owner] = factionDepotData["mats"][owner] + 2 local mats = factionDepotData["mats"][owner] MySQL_SetString("fraktionen", "DepotMaterials", mats, "id = '"..owner.."'") end end end end end end function gangAreaEinnahmen () for i = 1, gangCount do local pickup = _G["gangPickup"..i] local owner = vioGetElementData ( pickup, "gang" ) if validGangs[owner] then local id = vioGetElementData ( pickup, "gang" ) local gang = 0 if gang then factionDepotData["money"][owner] = factionDepotData["money"][owner] + vioGetElementData ( pickup, "einnahmen" ) local money = factionDepotData["money"][owner] MySQL_SetString ( "fraktionen", "DepotGeld", money, "id = '"..owner.."'" ) end end end end --[[function gangPickupHit ( hit ) outputChatBox ( "Dieses Ganggebiet gehoert: "..gangName[vioGetElementData( source, "gang" )], hit, 125, 125, 200 ) if areaTexts [ vioGetElementData ( source, "id" ) ] then bonus = "1 "..areaTexts [ vioGetElementData ( source, "id" ) ].." / 20 Minuten" else bonus = "-" end outputChatBox ( "Einnahmen/Stunde: "..( vioGetElementData ( source, "einnahmen" ) * 12 )..", Sonstige Boni: "..bonus, hit, 125, 125, 200 ) local fraktion = vioGetElementData ( hit, "fraktion" ) if vioGetElementData ( hit, "rang" ) >= 3 and validGangs[fraktion] then outputChatBox ( "Tippe /attack, um einen Angriff zu starten!", hit, 125, 0, 0 ) end end]] function attack_func ( player ) if validGangs[vioGetElementData ( player, "fraktion" )] and vioGetElementData ( player, "rang" ) >= 3 then local x1, y1, z1 = getElementPosition ( player ) sucess = false validID = nil for i = 1, gangCount do local x2, y2, z2 = getElementPosition ( _G["gangPickup"..i] ) if getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) <= 3 then validID = i sucess = true break end end if sucess then local pickup = _G["gangPickup"..validID] local owner = tonumber ( vioGetElementData ( pickup, "gang" ) ) if owner ~= vioGetElementData ( player, "fraktion" ) then if getFactionMembersOnline ( owner ) >= 3 then if not gangAreaUnderAttack then local lastAttacked = tonumber ( MySQL_GetString("gangs", "LastAttacked", "Nummer LIKE '" ..tonumber(validID).."'") ) local time = getRealTime() if time.timestamp > lastAttacked then startGangAreaAttack ( player, pickup, owner, validID ) end else outputChatBox ( "Es kann immer nur ein Angriff zur selben Zeit stattfinden!", player, 125, 0, 0 ) end else outputChatBox ( "Es muessen mindestens 3 Mitglieder der verteidigenden Gang online sein!", player, 125, 0, 0 ) end else outputChatBox ( "Du kannst nicht dein eigenes Gebiet angreifen!", player, 125, 0, 0 ) end else outputChatBox ( "Du bist bei keinem Ganggebiet!", player, 125, 0, 0 ) end else outputChatBox ( "Du bist nicht befugt!", player, 125, 0, 0 ) end end addCommandHandler ( "attack", attack_func ) function startGangAreaAttack ( player, pickup, owner, id ) local time = getRealTime() local area = _G["gangArea"..id] MySQL_SetString("gangs", "LastAttacked", time.timestamp+86400, "Nummer LIKE '" ..id.."'") gangAreaUnderAttack = true setRadarAreaFlashing ( area, true ) setRadarAreaColor ( area, 125, 0, 0, 200 ) vioSetElementData ( pickup, "isUnderAttack", true ) vioSetElementData ( pickup, "lastAttacked", time.timestamp+86400 ) eroberungsTimer = setTimer ( areaEroberungsCheck, 30*sec, -1, area, vioGetElementData ( player, "fraktion" ), owner, pickup ) victoryTimer = setTimer ( areaFinishCheck, 15*60*sec, -1, area, vioGetElementData ( player, "fraktion" ), owner, pickup, id ) ----------- local theattack = gangName[tonumber(vioGetElementData( player, "fraktion" ))] --------- sendMSGForFaction ( "Eines eurer Gebiete wird angegriffen! Verteidigt es, oder ihr werdet es verlieren!", owner, 125, 0, 0 ) sendMSGForFaction ( "Angreifer sind "..theattack.."!", owner, 125, 0, 0 ) outputChatBox ( "Du hast einen Angriff gestartet! Halte das Gebiet 15 Minuten lang, um es zu erobern!", player, 125, 0, 0 ) end function areaEroberungsCheck ( area, attackers, owner, pickup ) suc = false gangAreaAttackers = attackers gangAreaDefenders = owner for id, playeritem in ipairs ( getElementsByType( "player" ) ) do if tonumber ( vioGetElementData ( playeritem, "fraktion" ) ) == tonumber ( attackers ) then local x1, y1, z1 = getElementPosition ( pickup ) local x2, y2, z2 = getElementPosition ( playeritem ) if getDistanceBetweenPoints3D ( x1, y1, z1, x2, y2, z2 ) <= 50 and not isPedDead ( playeritem ) and z <= 100 then suc = true break end end end if not suc then setRadarAreaFlashing ( area, false ) local r = gangColor[owner][1] local g = gangColor[owner][2] local b = gangColor[owner][3] setRadarAreaColor ( area, r, g, b, 200 ) sendMSGForFaction ( "Angriff abgebrochen!", attackers, 125, 0, 0 ) sendMSGForFaction ( "Gebiet erfolgreich verteidigt!", owner, 0, 125, 0 ) vioSetElementData ( pickup, "isUnderAttack", false ) gangAreaUnderAttack = false gangAreaDefenders = false gangAreaAttackers = false killTimer ( eroberungsTimer ) killTimer ( victoryTimer ) end end function areaFinishCheck ( area, attackers, owner, pickup, id ) setRadarAreaFlashing ( area, false ) sendMSGForFaction ( "Angriff erfolgreich!", attackers, 0, 125, 0 ) sendMSGForFaction ( "Gebiet verloren!", owner, 125, 0, 0 ) vioSetElementData ( pickup, "isUnderAttack", false ) gangAreaUnderAttack = false gangAreaAttackers = false gangAreaDefenders = false vioSetElementData ( pickup, "gang", attackers ) MySQL_SetString("gangs", "BesitzerFraktion", attackers, "Nummer LIKE '"..id.."'") local r = gangColor[attackers][1] local g = gangColor[attackers][2] local b = gangColor[attackers][3] setRadarAreaColor ( area, r, g, b, 200 ) for id, playeritem in ipairs ( getElementsByType( "player" ) ) do if tonumber ( vioGetElementData ( playeritem, "fraktion" ) ) == tonumber ( attackers ) then givePlayerSaveMoney ( playeritem, gangAreaConquerEach ) triggerClientEvent ( playeritem, "achievsound", getRootElement() ) end end killTimer ( eroberungsTimer ) killTimer ( victoryTimer ) end function isReallyInsideRadarArea ( theArea, x, y ) local posX, posY = getElementPosition ( theArea ) local sizeX, sizeY = getRadarAreaSize ( theArea ) if getDistanceBetweenPoints2D ( x, y, posX, posY ) <= 100 then return true else return false end end isInsideRadarArea = nil
Externer Inhalt www7.pic-upload.deInhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt. -
Hä.... ich mein das der Fraktions Name in der Tabliste steht
z.B "StiviK | BLABLA | 5:00 | 45ms | ARMY"
Also dass der Fraktions name noch dazu steht! In einem Extra TAB -
-
Heyho,
Ich habe eine frage: Und zwar wie kann man in derTab Liste auch die Fraktion eines Spielers anzeigen lassen! Unter dem Tab "Fraktion"?
Ich habe es versucht mir selber zu scripten, das hat aber nich geklappt dann habe ich es aus wut iwan den anfang gelöscht
Könntet ihr mir helfen?LG
-
InstantNudeln~: http://h20386.www2.hp.com/GermanyStore/M…atured-products
Wenn du ein HP Notebook willst