@LuXorioN:
Ich habe schon eins
mein Schwer Punkt ist bei Marry und dem Sweeper
@LuXorioN:
Ich habe schon eins
mein Schwer Punkt ist bei Marry und dem Sweeper
Es haben 2 Scripter versucht
1x Marry zu Entbuggen das geht immer noch nicht
1x Sweeper
Mir kann keiner Helfen
Ja ich denke hat sich erledigt
Ich habe nur Bugs mit dem Sweeper
haha Danke
Aber es ist keine Resource habe sie im Ultimate ordner abgelegt,,
habe es versucht zu Starten klappt jedoch nicht so wie ich es möchte
[11:54:28] ERROR: ultimate/jobs/s_streetcleaner.lua:209: exports: Call to non-running server resource (anticheat) [string "?"]
[11:54:32] WARNING: ultimate/jobs/s_streetcleaner.lua:265: Bad argument @ 'getElementAttachedTo' [Expected element at argument 1, got boolean]
[11:54:32] WARNING: ultimate/jobs/s_streetcleaner.lua:266: Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean]
[11:54:32] WARNING: ultimate/jobs/s_streetcleaner.lua:267: Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean]
[11:54:32] ERROR: ultimate/jobs/s_streetcleaner.lua:277: exports: Call to non-running server resource (pool) [string "?"]
[11:54:32] ERROR: ultimate/jobs/s_streetcleaner.lua:278: exports: Call to non-running server resource (pool) [string "?"]
[11:54:32] ERROR: ultimate/jobs/s_streetcleaner.lua:286: exports: Call to non-running server resource (pool) [string "?"]
[11:54:32] ERROR: ultimate/jobs/s_streetcleaner.lua:288: exports: Call to non-running server resource (anticheat) [string "?"]
Nutze das Anticheat von Ultimate
und habe in die Meta.xml dies herein geschrieben
<export function="giveSafeWeapon" type="server"/>
<export function="setSafeWeaponAmmo" type="server"/>
<export function="takeAllWeaponsSafe" type="server"/>
<export function="takeWeaponSafe" type="server"/>
<export function="changeProtectedElementDataEx" type="server"/>
<export function="changeProtectedElementData" type="server"/>
<export function="protectElementData" type="server"/>
<export function="allowElementData" type="server"/>
Dies ist die s_element.lua wo eigentlich alles defined ist
addEventHandler("onElementDataChange", getRootElement(),
function (index, oldValue)
local theElement = source
if (getElementType(theElement) == "player") then
local isProtected = getElementData(theElement, "p:"..index)
if (isProtected) then
-- get real source here
-- it aint source!
local sourceClient = client
if (sourceClient) then
local newData = getElementData(source, index)
local playername = getPlayerName(source) or "Somethings"
-- Get rid of the player
local msg = "[AdmWarn] " .. getPlayerName(sourceClient) .. " sent illegal data. Player has been banned."
local msg2 = " (victim: "..playername.." index: "..index .." newvalue:".. tostring(newData) .. " oldvalue:".. tostring(oldValue) ..")"
exports.global:sendMessageToAdmins(msg)
exports.global:sendMessageToAdmins(msg2)
exports.logs:logMessage(msg..msg2, 29)
-- uncomment this when it works
local ban = banPlayer(sourceClient, true, false, false, getRootElement(), "Hacked Client.", 0)
-- revert data
changeProtectedElementDataEx(source, index, oldValue, true)
end
end
end
end
);
addEventHandler ( "onPlayerJoin", getRootElement(),
function ()
protectElementData(source, "adminlevel")
protectElementData(source, "donatorlevel")
protectElementData(source, "gameaccountid")
protectElementData(source, "gameaccountusername")
protectElementData(source, "legitnamechange")
protectElementData(source, "dbid")
end
);
function allowElementData(thePlayer, index)
setElementData(thePlayer, "p:"..index, false, false)
end
function protectElementData(thePlayer, index)
setElementData(thePlayer, "p:"..index, true, false)
end
function changeProtectedElementData(thePlayer, index, newvalue)
allowElementData(thePlayer, index)
setElementData(thePlayer, index, newvalue)
protectElementData(thePlayer, index)
end
function changeProtectedElementDataEx(thePlayer, index, newvalue, sync)
if (thePlayer) and (index) then
if not newvalue then
newvalue = nil
end
allowElementData(thePlayer, index)
setElementData(thePlayer, index, newvalue, sync)
protectElementData(thePlayer, index)
return true
end
return false
end
Alles anzeigen
Und hier die s_element.lua wo eigentlich alles Defined ist
Ok ich formuliere es anders
@n0pe'
Ich möchte einen Marker erstellen wo der Spieler den Job beginnen kann.
Wie kann ich einen Marker erstellen mit Coordination und Icon auf der Map
@n0pe:
Nun ja schau mal her
& Danke im Vorraus
function initiateCleanerJob(thePlayer)
local blip = createBlip(-2110.7666015625, 257.81484985352, 27.78125, 0, 2, 255, 0, 255, 255)
local marker = createMarker(-2110.7666015625, 257.81484985352, 27.78125, "cylinder", 2, 0, 255, 0, 150)
exports.pool:allocateElement(blip)
exports.pool:allocateElement(marker)
attachElements ( marker, blip )
setElementVisibleTo(blip, getRootElement(), false)
setElementVisibleTo(blip, thePlayer, true)
setElementVisibleTo(marker, getRootElement(), false)
setElementVisibleTo(marker, thePlayer, true)
outputChatBox("Welcome to the team, you can pick up your street cleaning van at the Depo near City Hall. ", thePlayer, 255, 194, 14)
outputChatBox("((A pink blip has been added to your map - Press F11))", thePlayer, 255, 194, 14)
addEventHandler("onMarkerHit", marker, startCleaningMission, false)
end
Alles anzeigen
Da sind ja nun die local marker = createMarker usw
Dieser Erstellt mir diese auch, jedoch möchte ich nicht immer /jobstraße eingeben sondern man soll zb. an einen Marker oder NPC hin gehen können damit man dort den Job auswählen kann
Guten Morgen ihr Lieben,
Ich habe Probleme bei meinem Script was ich gestern Geschrieben hatte für das Ultimate
[10:20:24] WARNING: ultimate/jobs/s_streetcleaner.lua:102: Bad argument @ 'getElementAttachedTo' [Expected element at argument 1, got nil]
[10:20:24] WARNING: ultimate/jobs/s_streetcleaner.lua:103: Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean]
[10:20:24] WARNING: ultimate/jobs/s_streetcleaner.lua:104: Bad argument @ 'destroyElement' [Expected element at argument 1, got nil]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:109: exports: Call to non-running server resource (pool) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:111: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:112: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:113: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:114: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:115: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:116: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:117: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:118: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:122: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:123: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:131: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:132: exports: Call to non-running server resource (anticheat-system) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:148: exports: Call to non-running server resource (pool) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:149: exports: Call to non-running server resource (pool) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:157: exports: Call to non-running server resource (pool) [string "?"]
[10:20:24] ERROR: ultimate/jobs/s_streetcleaner.lua:159: exports: Call to non-running server resource (anticheat-system) [string "?"]
Alles anzeigen
Und hier die Zeilen von s_streetcleaner.lua
local attached = getElementAttachedTo ( source ) -- source is the marker; attatched is the blip
destroyElement(attached)
destroyElement(source)
attached = nil
source = nil
local vehicle = createVehicle(-2127.3955078125, 294.5126953125, 27.717185974121, 0, 0, 0.645355224609, "CLEANER")
exports.pool:allocateElement(vehicle)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "fuel", 100)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "owner", -2, false)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "faction", -1, false)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "dbid", 999999, false)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "oldx", 1503.5179443359, false)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "oldy", 369.0305175781, false)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "oldz", 10.8203125, false)
exports['anticheat']:changeProtectedElementDataEx(vehicle, "engine", 1, false)
removePedFromVehicle(thePlayer)
warpPedIntoVehicle(thePlayer, vehicle)
exports['anticheat']:changeProtectedElementDataEx(thePlayer, "cleaner.marker", "1")
exports['anticheat']:changeProtectedElementDataEx(thePlayer, "cleaner.vehicle", vehicle)
local int = math.random ( 1, 1 ) -- Number of checkpoint paths. (1 minimum , 3 max )
Alles anzeigen
Hoffe mir kann einer Helfen damit dieses Problem beseitigt ist
Vielen Lieben Dank
Jetzt brauche ich nur noch eine Information
Wie kann ich ein Marker machen mit Text
zb.
local createmarker = {XYZPOS}, "Hier kannst du den Sweeper Job beginnen"
Hallo Freunde
Ich Scripte derzeit für den Server von uns ein Sweeper System
Nun habe ich diese Koordinationen ausgewählt
--------- LIST OF CHECKPOINTS (x,y,z)
CheckpointStyle_1 = {
Checkpoints(1503.5179443359, 2369.0305175781, 10.8203125), -- 1
Checkpoints(1464.6153564453, 2395.1040039063, 10.402856826782), -- 2
Checkpoints(1384.7719726563, 2333.8818359375, 10.397030830383), -- 3
Checkpoints(1551.2609863281, 2310.1337890625, 10.378786087036), -- 4
Checkpoints(1564.5493164063, 2183.0297851563, 10.385837554932), -- 5
Checkpoints(1721.5200195313, 2170.8815917969, 10.462002754211), -- 6
Checkpoints(1794.4456787109, 2111.9787597656, 10.526327133179), -- 7
Checkpoints(1906.0688476563, 2039.1931152344, 10.378953933716), -- 8
Checkpoints(2047.5615234375, 2019.7652587891, 10.378077507019), -- 9
Checkpoints(2119.1411132813, 1889.6407470703, 10.377884864807), -- 10
Checkpoints(2040.5341796875, 1649.0466308594, 10.379492759705),
Checkpoints(2057.3032226563, 971.04376220703, 10.187139511108),
Checkpoints(2194.17578125, 970.45745849609, 10.379013061523),
Checkpoints(2349.8679199219, 1146.8768310547, 10.378357887268),
Checkpoints(2429.4118652344, 1294.2354736328, 10.379963874817), -- 15
Checkpoints(2329.783203125, 1674.2967529297, 10.375924110413),
Checkpoints(2197.2158203125, 1776.431640625, 10.378499984741),
Checkpoints(2154.8635253906, 2036.650390625, 10.377578735352),
Checkpoints(2137.6833496094, 2149.0537109375, 10.380690574646),
Checkpoints(2070.3601074219, 2115.6586914063, 10.377153396606), --20
Checkpoints(1929.2501220703, 2178.8508300781, 10.461337089539),
Checkpoints(1749.9678955078, 2276.0661621094, 10.767349243164),
Checkpoints(1589.3919677734, 2276.353515625, 10.383700370789),
Checkpoints(1570.5980224609, 2370.2763671875, 10.3788022995),
Checkpoints(1514.619140625, 2396.099609375, 10.380763053894) -- 25
}
--------- LIST OF CHECKPOINTS (x,y,z) STILL LS
CheckpointStyle_2 = {
Checkpoints(1352.8961181641, -1859.5826416016, 13.062502861023), -- 1
Checkpoints(1285.7108154297, -1848.6300048828, 13.070272445679), -- 2
Checkpoints(1236.6922607422, -1848.9869384766, 13.062520980835), -- 3
Checkpoints(1183.7025146484, -1829.6427001953, 13.084740638733), -- 4
Checkpoints(1183.2073974609, -1745.0368652344, 13.078165054321), -- 5
Checkpoints(1165.7062988281, -1709.0847167969, 13.386648178101), -- 6
Checkpoints(1152.9514160156, -1655.8560791016, 13.460966110229), -- 7
Checkpoints(1177.3618164063, -1575.5860595703, 13.021441459656), -- 8
Checkpoints(1199.3806152344, -1537.73046875, 13.062530517578), -- 9
Checkpoints(1229.5970458984, -1409.8035888672, 12.762256622314), -- 10
Checkpoints(1326.4197998047, -1409.5676269531, 12.994469642639),
Checkpoints(1333.708984375, -1460.2164306641, 13.062521934509),
Checkpoints(1299.7297363281, -1531.2474365234, 13.062524795532),
Checkpoints(1293.5206298828, -1697.1125488281, 13.062491416931),
Checkpoints(1294.2446289063, -1758.6617431641, 13.062560081482), -- 15
Checkpoints(1318.3055419922, -1855.8670654297, 13.062488555908),
Checkpoints(1466.8850097656, -1875.3677978516, 13.062706947327)
}
--------- LIST OF CHECKPOINTS (x,y,z) STIlL LS
CheckpointStyle_3 = {
Checkpoints(1392.9182128906, -1849.4359130859, 13.062501907349), -- 1
Checkpoints(1359.4191894531, -1728.3851318359, 13.062509536743), -- 2
Checkpoints(1316.0694580078, -1706.1624755859, 13.062499046326), -- 3
Checkpoints(1315.7808837891, -1613.7049560547, 13.062588691711), -- 4
Checkpoints(1350.2197265625, -1482.302734375, 13.062542915344), -- 5
Checkpoints(1361.4122314453, -1331.4384765625, 13.072121620178), -- 6
Checkpoints(1376.0242919922, -1244.6530761719, 13.062377929688), -- 7
Checkpoints(1458.2574462891, -1204.8851318359, 17.670797348022), -- 8
Checkpoints(1552.6872558594, -1164.6351318359, 23.586046218872), -- 9
Checkpoints(1677.3698730469, -1163.7897949219, 23.336751937866), -- 10
Checkpoints(1785.4711914063, -1175.5250244141, 23.334577560425),
Checkpoints(1843.4012451172, -1213.3070068359, 19.598274230957),
Checkpoints(1843.5284423828, -1308.5684814453, 13.069962501526),
Checkpoints(1825.5729980469, -1554.466796875, 13.05043888092),
Checkpoints(1818.0430908203, -1675.3146972656, 13.062560081482), -- 15
Checkpoints(1817.8955078125, -1795.8341064453, 13.062686920166),
Checkpoints(1831.951171875, -1936.1204833984, 13.059115409851)
}
Alles anzeigen
Doch leider alles für den Arsch
Kann mir evtl einer die von SF geben?
Oder mir sagen wie ich Positionen schneller heraus bekommen kann anstatt mit P Panel
Verstehe nur nich wie es GetPlayername als Funktion ist
local pl1 = getPlayerName ( pname )
local pl2 = getPlayerName ( pname )
local x, y, z = getElementPosition ( player )
local x1, y1, z1 = getElementPosition ( pl1 )
local x2, y2, z2 = getElementPosition ( pl2 )
if getDistanceBetweenPoints3D ( xa, ya, za, x, y, z ) <= 10 and getDistanceBetweenPoints3D ( xa, ya, za, x1, y1, z1 ) <= 10 and getDistanceBetweenPoints3D ( xa, ya, za, x2, y2, z2 ) <= 10 then
if vioGetElementData ( pl1, "playingtime" ) >= 960 and vioGetElementData ( pl2, "playingtime" ) >= 960 then
if vioGetElementData ( pl1, "married" ) == 0 and vioGetElementData ( pl2, "married" ) == 0 then
if pl1 == pl2 or pl1 == player or pl2 == player then
outputChatBox("Der Braeutigam / die Braut und du muessen 3 verschiedene Spieler sein!.", player, 255, 150, 0)
else
mysql_vio_query ( "INSERT INTO marry (pl1, pl2, nachname) VALUES ('"..getPlayerName(pl1).."', '"..getPlayerName(pl2).."', '"..nachname.."')" )
outputChatBox(""..getPlayerName(pl1).." und "..getPlayerName(pl2).." wurden erfolgreich Verheiratet!", player, 255, 150, 0)
vioSetElementData(pl1, "married", 1)
vioSetElementData(pl1, "marwith", getPlayerName(pl2))
vioSetElementData(pl2, "married", 1)
vioSetElementData(pl2, "marwith", getPlayerName(pl1))
end
Alles anzeigen
Jetzt verstehe ich auch wieso das SQL ist
Normal müsste er doch local mysql_connect(db, usw erkennen oder? @R3Dtig3r:
@R3Dtig3r:
Das hast du nun Falsch Verstanden xD
Ich wollte damit sagen, das wir uns bedanken und das Jordon in meinem Team ist
@Scarsm: der Moderator wollte mich Sperren weil er dachte ich sei Jordon
@R3Dtig3r;
Habe davon Ahnung
..Jordon ist in meinem Team.. War eben allerdings afk
Danke euch dennoch allen
Ja aus dem THC
Aber dennoch sollte dies gehen
Die Ultimate Datenbank hat die selbe Funtkion!!
Scripterror habe ich derzeit noch keine
iLimix:
Wenn dich hier einer was fragt versuchst du hier dein Bestes?!
@..Jordon:
Wenn du ein Heiratsscript suchst, dann musst du ab und zu mal in die Resourcen schauen von einigen Gamemodes
Du kannst aber auch die Resourcen Seite benutzen um dort mal nachzusehen
https://community.mtasa.com/
MFG dein Bro
marryinprogress = false
local kircheraus = createMarker( 1277.099, 1301.599, 452.2, "cylinder", 1.2, 255, 0, 0, 255 )
setElementInterior(kircheraus, 66)
local markerin = createMarker( -1989.04, 1117.92, 53.5, "cylinder", 1.2, 255, 0, 0, 255 )
local info = createPickup ( -1987.975, 1120.550, 54.12, 3, 1239, 1, 0 )
local xa, ya, za = 1271.948, 1297.240, 453 -- Altar
function inDieKirche(player)
if marryinprogress == true then
outputChatBox("Man kommt nicht zu Spät zu einer Hochzeit!", player, 255, 0, 0)
else
setElementPosition(player, 1275.361, 1301.411, 453.084)
setElementInterior(player, 66)
end
end
addEventHandler("onMarkerHit", markerin, inDieKirche)
function ausDieKirche(player)
setElementInterior(player, 0)
setElementPosition(player, -1986.466, 1117.362, 53.857)
if marryinprogress == true then
outputChatBox("Pff.. Die Hochzeit ist ja noch garnicht zu ende, eine Frechheit!", player, 255, 0, 0)
end
end
addEventHandler("onMarkerHit", kircheraus, ausDieKirche)
function KirchePickup(player)
outputChatBox("Um in der Kirche einen anderen Spieler zu Heiraten wende dich per /support an einen Admin.", player, 255, 155, 0)
outputChatBox("Kosten einer Heirat: 100.000$", player, 255, 155, 0)
outputChatBox("Vorteile: Spawn Haus des Partners, Sozialer Status, Steuern niedriger, Ring unter Name", player, 255, 155, 0)
end
addEventHandler("onPickupHit", info, KirchePickup)
function marry_func ( player, cmd, pl1, pl2, nachname )
if vioGetElementData(player, "adminlvl") >= 3 then
local pl1 = getPlayerFromName ( pl1 )
local pl2 = getPlayerFromName ( pl2 )
if pl1 and pl2 and nachname then
local x, y, z = getElementPosition ( player )
local x1, y1, z1 = getElementPosition ( pl1 )
local x2, y2, z2 = getElementPosition ( pl2 )
if getDistanceBetweenPoints3D ( xa, ya, za, x, y, z ) <= 10 and getDistanceBetweenPoints3D ( xa, ya, za, x1, y1, z1 ) <= 10 and getDistanceBetweenPoints3D ( xa, ya, za, x2, y2, z2 ) <= 10 then
if vioGetElementData ( pl1, "playingtime" ) >= 960 and vioGetElementData ( pl2, "playingtime" ) >= 960 then
if vioGetElementData ( pl1, "married" ) == 0 and vioGetElementData ( pl2, "married" ) == 0 then
if pl1 == pl2 or pl1 == player or pl2 == player then
outputChatBox("Der Braeutigam / die Braut und du muessen 3 verschiedene Spieler sein!.", player, 255, 150, 0)
else
mysql_vio_query ( "INSERT INTO marry (pl1, pl2, nachname) VALUES ('"..getPlayerName(pl1).."', '"..getPlayerName(pl2).."', '"..nachname.."')" )
outputChatBox(""..getPlayerName(pl1).." und "..getPlayerName(pl2).." wurden erfolgreich Verheiratet!", player, 255, 150, 0)
vioSetElementData(pl1, "married", 1)
vioSetElementData(pl1, "marwith", getPlayerName(pl2))
vioSetElementData(pl2, "married", 1)
vioSetElementData(pl2, "marwith", getPlayerName(pl1))
end
else
outputChatBox("Der Braeutigam / die Braut sind bereits verheiratet! Tzz... Solche Heiratsschwindler...", player, 255, 150, 0)
end
else
outputChatBox("Der Braeutigam / die Braut muessen min. 16 Spielstunden haben.", player, 255, 150, 0)
end
else
outputChatBox("Ihr seit nicht bei der Kirche.", player, 255, 150, 0)
end
else
outputChatBox("Verwende /marry Spieler1 Spieler2 Nachname | Der Nachname darf keine Leerzeichen enthalten!", player, 255, 150, 0)
end
else
outputChatBox("Du bist nicht befugt.", player, 200, 0, 0)
end
end
addCommandHandler ( "marry", marry_func )
function lockkirche(player)
if vioGetElementData(player, "adminlvl") >= 3 then
if marryinprogress == true then
marryinprogress = false
outputChatBox("Kirche unlocked", player)
else
marryinprogress = true
outputChatBox("Kirche locked", player)
end
end
end
addCommandHandler("lockkirche", lockkirche)
function unmarry_func ( player, cmd, pl )
if vioGetElementData(player, "adminlvl") >= 3 then
local pl = getPlayerFromName ( pl )
if pl then
if vioGetElementData(pl, "married") == 1 then
local partner = vioGetElementData(pl, "marwith")
outputChatBox("Moechtest du dich von "..partner.." Scheiden? Wenn ja Tippe /acceptunmarry", pl, 255, 150, 0)
setElementData(pl, "unmarry", 1)
outputChatBox("Der Spieler muss die Scheidung nun bestaetigen.", player, 255, 150, 0)
else
outputChatBox("Der Spieler ist nicht verheiratet!", player, 255, 150, 0)
end
else
outputChatBox("Verwende /unmarry Spieler", player, 255, 150, 0)
end
else
outputChatBox("Du bist nicht befugt.", player, 200, 0, 0)
end
end
addCommandHandler ( "unmarry", unmarry_func )
function acceptunmarry_func ( player )
if getElementData(player, "unmarry") == 1 then
local pname = getPlayerName(player)
local partner = vioGetElementData(player, "marwith")
local query1 = MySQL_GetString("marry", "pl1", "pl1 LIKE '"..pname.."'")
local query2 = MySQL_GetString("marry", "pl2", "pl2 LIKE '"..pname.."'")
if query1 == pname then
outputChatBox("Du hast dich erfolgreich von "..partner.." getrennt!", player, 255, 150, 0)
mysql_vio_query ( "DELETE FROM marry WHERE pl1='"..pname.."'" )
setElementData(player, "unmarry", 0)
vioSetElementData(player, "married", 0)
vioSetElementData(player, "marwith", "none")
if getPlayerFromName(partner) then
outputChatBox(""..getPlayerName(player).." hat sich von dir Scheiden Lassen.", getPlayerFromName(partner), 255, 150, 0)
vioSetElementData(getPlayerFromName(partner), "married", 0)
vioSetElementData(getPlayerFromName(partner), "marwith", "none")
else
offlinemsg ( ""..getPlayerName(player).." hat sich von dir Scheiden Lassen.", "Standesamt", partner )
end
elseif query2 == pname then
outputChatBox("Du hast dich erfolgreich von "..partner.." getrennt!", player, 255, 150, 0)
mysql_vio_query ( "DELETE FROM marry WHERE pl2='"..pname.."'" )
setElementData(player, "unmarry", 0)
vioSetElementData(player, "married", 0)
vioSetElementData(player, "marwith", "none")
if getPlayerFromName(partner) then
outputChatBox(""..getPlayerName(player).." hat sich von dir Scheiden Lassen.", getPlayerFromName(partner), 255, 150, 0)
vioSetElementData(getPlayerFromName(partner), "married", 0)
vioSetElementData(getPlayerFromName(partner), "marwith", "none")
else
offlinemsg ( ""..getPlayerName(player).." hat sich von dir Scheiden Lassen.", "Standesamt", partner )
end
end
else
outputChatBox("Du hast keinen Scheidungsantrag.", player, 255, 155, 0)
end
end
addCommandHandler ( "acceptunmarry", acceptunmarry_func )
function getMarryCar(partner)
local player = source
if vioGetElementData(player, "married") == 1 then
if partner then
local partnerquery1 = MySQL_GetString("marry", "car1", "pl1 LIKE '"..partner.."'")
local partnerquery2 = MySQL_GetString("marry", "car2", "pl2 LIKE '"..partner.."'")
if partnerquery1 == 1 or partnerquery1 == 0 then
return MySQL_GetString("marry", "car1", "pl1 LIKE '"..partner.."'")
elseif partnerquery2 == 1 or partnerquery2 == 0 then
return MySQL_GetString("marry", "car2", "pl2 LIKE '"..partner.."'")
else
return false
end
else
return false
end
else
return false
end
end
-------------------------------------------------------------------------
function live_func ( player, cmd, target )
if vioGetElementData(player, "adminlvl") >= 1 then
local target = findPlayerByName( target )
if target then
vioSetElementData ( target, "isLive", true )
vioSetElementData ( player, "isLive", true )
vioSetElementData ( target, "isLiveWith", getPlayerName(player) )
vioSetElementData ( player, "isLiveWith", getPlayerName(target) )
outputChatBox ( "Du bist nun in einem Interview mit "..getPlayerName(player)..", tippe /endlive zum beenden.", target, 200, 200, 0 )
outputChatBox ( "Du bist nun in einem Interview mit "..getPlayerName(target)..", tippe /endlive zum beenden.", player, 200, 200, 0 )
end
end
end
addCommandHandler ( "live", live_func )
function endlive_func ( player )
if vioGetElementData ( player, "isLive" ) then
vioSetElementData ( player, "isLive", false )
outputChatBox ( "Das Interview wurde beendet!", player, 0, 200, 0 )
local target = vioGetElementData ( player, "isLiveWith" )
local target = getPlayerFromName ( target )
if target then
outputChatBox ( "Das Interview wurde beendet!", target, 0, 200, 0 )
vioSetElementData ( target, "isLive", false )
end
else
outputChatBox ( "Du bist in keiner Live-Unterhaltung!", player, 125, 0, 0 )
end
end
addCommandHandler ( "endlive", endlive_func )
Alles anzeigen
@Gaywid:
Wo hast du den die Funktion gefunden?
bzw. wo oder wie hast du das eingefügt
@R3Dtig3r:
Ich kann keinen PC Selber bauen, wenn meine letzten 2 Explodiert sind xD dies ist eine Tatsache
Systemtreff.de
hat mir gut Gefallen habe einen ausgang gefunden
Danke dennoch für alle Beiträge hier