Furious^ONE!
Members-
Posts
171 -
Joined
-
Last visited
Everything posted by Furious^ONE!
-
Salut tout le monde ! J'ai un soucis assez embêtant de mon script , le vois çi , ci dessous : function teleport(gracz, cmd) local accName = getAccountName ( getPlayerAccount ( gracz ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Police" ) ) then setElementPosition(gracz, 1586.52112, -1607.66797, 13.38281) else outputChatBox("Vous n'êtes pas de la SAPD",source, 255,241,0) end end addCommandHandler("prison1",teleport) Le problème c'est que quand un joueurs qui est pas dans le groupe ACL Police il vois apparaître la phrase : "Vous n'êtes pas de la SAPD" et quand il fait la commande et ce message apparait , tout le joueurs connécté du serveur le vois aussi. Donc j'aimerai savoir comment je peux pour faire en sorte que , que le joueurs qui tape la commande le voit s'il vous plait. Merci d'avance
-
Is an error : [03:50:31] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getPlayerTeam' [03:50:31] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getTeamName' [03:50:36] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getPlayerTeam' [03:50:36] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getTeamName' [03:50:02] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getPlayerTeam' [03:50:02] WARNING: @Taser_equipe\server.lua:3: Bad argument @ 'getTeamName' [03:50:02] WARNING: @Taser_equipe\server.lua:4: Bad argument @ 'giveWeapon' [Expected element at argument 1, got nil]
-
I tried to make a script to give a taser but its not working. Help me please CODE: function giveTaser (player) team = getPlayerTeam ( giveTaser ) if getTeamName ( team ) ~= "Police" then return end giveWeapon ( source , 23,700 ) outputChatBox("Vous vous êtes equipé du Taser !",player) end addCommandHandler("equipertaser",giveTaser)
-
Hello ! I'm search for how to put this, in a script with access acl admins , please help me. -- ~ [CUFF, HANDCUFF, RESTRAIN] ~ -- addCommandHandler({"cuff", "handcuff", "restrain"}, function(player, cmd, name) for i,v in ipairs(getElementsByType("ped")) do if tonumber(getElementData(player, "factions.player")) == tonumber(getElementData(v, "factions.id")) then if exports.brpExports:getFactionType(v) == "law" then if name then local target = exports.brpExports:findPlayer(name, player) if target then if player ~= target then local x, y, z = getElementPosition(player) if exports.brpExports:isElementInRangeOfPoint(target, x, y, z, 5) then if not getElementData(target, "police.cuffed") then toggleControl(target, "fire", false) toggleControl(target, "next_weapon", false) toggleControl(target, "previous_weapon", false) toggleControl(target, "sprint", false) toggleControl(target, "aim_weapon", false) toggleControl(target, "handbrake", false) toggleControl(target, "vehicle_fire", false) toggleControl(target, "vehicle_secondary_fire", false) toggleControl(target, "vehicle_left", false) toggleControl(target, "vehicle_right", false) toggleControl(target, "steer_forward", false) toggleControl(target, "steer_back", false) setElementData(target, "police.cuffed", true) outputChatBox("You are now restraining " .. getPlayerName(target) .. ".", player, 255, 255, 255, false) outputChatBox("You are now restrained by " .. getPlayerName(target) .. ".", target, 255, 255, 255, false) outputServerLog("[FACTIONS] [CMD/CUFF]: " .. getPlayerName(player) .. " is now restraining " .. getPlayerName(target) .. ".") else outputChatBox("That player is already handcuffed.", player, 255, 0, 0, false) end else outputChatBox("You are too far from the target.", player, 255, 0, 0, false) end else outputChatBox("You cannot cuff yourself.", player, 255, 0, 0, false) end else outputChatBox("Couldn't find such player.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " ", player, 220, 220, 0, false) end end end end end ) -- ~ [uNCUFF, UNHANDCUFF, UNRESTRAIN] ~ -- addCommandHandler({"uncuff", "unhandcuff", "unrestrain"}, function(player, cmd, name) for i,v in ipairs(getElementsByType("ped")) do if tonumber(getElementData(player, "factions.player")) == tonumber(getElementData(v, "factions.id")) then if exports.brpExports:getFactionType(v) == "law" then if name then local target = exports.brpExports:findPlayer(name, player) if target then if player ~= target then local x, y, z = getElementPosition(player) if exports.brpExports:isElementInRangeOfPoint(target, x, y, z, 5) then if getElementData(target, "police.cuffed") then toggleControl(target, "fire", true) toggleControl(target, "next_weapon", true) toggleControl(target, "previous_weapon", true) toggleControl(target, "sprint", true) toggleControl(target, "aim_weapon", true) toggleControl(target, "handbrake", true) toggleControl(target, "vehicle_fire", true) toggleControl(target, "vehicle_secondary_fire", true) toggleControl(target, "vehicle_left", true) toggleControl(target, "vehicle_right", true) toggleControl(target, "steer_forward", true) toggleControl(target, "steer_back", true) removeElementData(target, "police.cuffed") outputChatBox("You unrestrained " .. getPlayerName(target) .. ".", player, 255, 255, 255, false) outputChatBox("You are unrestrained by " .. getPlayerName(target) .. ".", target, 255, 255, 255, false) outputServerLog("[FACTIONS] [CMD/UNCUFF]: " .. getPlayerName(player) .. " now unrestrained " .. getPlayerName(target) .. ".") else outputChatBox("That player is not handcuffed.", player, 255, 0, 0, false) end else outputChatBox("You are too far from the target.", player, 255, 0, 0, false) end else outputChatBox("You cannot uncuff yourself.", player, 255, 0, 0, false) end else outputChatBox("Couldn't find such player.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " ", player, 220, 220, 0, false) end end end end end ) -- ~ [AUNCUFF, AUNHANDCUFF, AUNRESTRAIN] ~ -- addCommandHandler({"auncuff", "aunhandcuff", "aunrestrain"}, function(player, cmd, name) if exports.brpExports:isPlayerAdmin(player) then if name then local target = exports.brpExports:findPlayer(name, player) if target then if getElementData(target, "police.cuffed") then toggleControl(target, "fire", true) toggleControl(target, "next_weapon", true) toggleControl(target, "previous_weapon", true) toggleControl(target, "sprint", true) toggleControl(target, "aim_weapon", true) toggleControl(target, "handbrake", true) toggleControl(target, "vehicle_fire", true) toggleControl(target, "vehicle_secondary_fire", true) toggleControl(target, "vehicle_left", true) toggleControl(target, "vehicle_right", true) toggleControl(target, "steer_forward", true) toggleControl(target, "steer_back", true) removeElementData(target, "police.cuffed") outputChatBox("You unrestrained " .. getPlayerName(target) .. ".", player, 255, 255, 255, false) outputChatBox("You are unrestrained by " .. getPlayerName(target) .. ".", target, 255, 255, 255, false) outputServerLog("[FACTIONS] [CMD/UNCUFF]: " .. getPlayerName(player) .. " now unrestrained " .. getPlayerName(target) .. ".") else outputChatBox("That player is not handcuffed.", player, 255, 0, 0, false) end else outputChatBox("Couldn't find such player.", player, 255, 0, 0, false) end else outputChatBox("Syntax: /" .. cmd .. " ", player, 220, 220, 0, false) end end end )
-
How to access to the Admin on the script? HELP ME
Furious^ONE! replied to Furious^ONE!'s topic in Scripting
His works thank you very much for your help! -
How to access to the Admin on the script? HELP ME
Furious^ONE! replied to Furious^ONE!'s topic in Scripting
thank you , but the object which is moved does not appear. -
Hi Please help me, I'd like my script is restricted to admins when you make a command (/ op / pf) Help me please. local gate = createObject(10828, -1570.5, 1117.5, 16.10000038147, 0, 0, 91.988525390625) function open() moveObject(gate, 3000, -1570.5, 1117.5, 30.2, 0, 0, 0 ) end addCommandHandler("op", open) function close() moveObject(gate, 3000, -1570.5, 1117.5, 16.10000038147, 0, 0, 0 ) end addCommandHandler("fp", close)
-
how to script in the server?
-
Hello I have a problem with my script is that when I did / aduty it must pass everyone see "ADMIN ON DUTY" but unfortunately there's only me who sees it as done for all players see the message on my head. Code : Client.lua local fonts = { [ "default" ] = true, [ "default-bold" ] = true,[ "clear" ] = true,[ "arial" ] = true,[ "sans" ] = true, [ "pricedown" ] = true, [ "bankgothic" ] = true,[ "diploma" ] = true,[ "beckett" ] = true }; function dxDraw3DText( text, x, y, z, scale, font, r, g, b, maxDistance ) assert( type( text ) == "string", "Bad argument @ dxDraw3DText" ); assert( type( x ) == "number", "Bad argument @ dxDraw3DText" ); assert( type( y ) == "number", "Bad argument @ dxDraw3DText" ); assert( type( z ) == "number", "Bad argument @ dxDraw3DText" ); if not scale or type( scale ) ~= "number" or scale <= 0 then scale = 2 end if not font or type( font ) ~= "string" or not fonts[ font ] then font = "default" end if not r or type( r ) ~= "number" or r < 0 or r > 255 then r = 255 end if not g or type( g ) ~= "number" or g < 0 or g > 255 then g = 255 end if not b or type( b ) ~= "number" or b < 0 or b > 255 then b = 255 end if not maxDistance or type( maxDistance ) ~= "number" or maxDistance <= 1 then maxDistance = 12 end local textElement = createElement( "text" ); if textElement then setElementData( textElement, "text", text ); setElementData( textElement, "x", x ); setElementData( textElement, "y", y ); setElementData( textElement, "z", z ); setElementData( textElement, "scale", scale ); setElementData( textElement, "font", font ); setElementData( textElement, "rgba", { r, g, b, 255 } ); setElementData( textElement, "maxDistance", maxDistance ); return textElement end return false end addEventHandler( "onClientRender", root, function( ) local texts = getElementsByType( "text" ); if #texts > 0 then local pX, pY, pZ = getElementPosition( localPlayer ); for i = 1, #texts do local text = getElementData( texts[i], "text" ); local tX, tY, tZ = getElementData( texts[i], "x" ), getElementData( texts[i], "y" ), getElementData( texts[i], "z" ); local font = getElementData( texts[i], "font" ); local scale = getElementData( texts[i], "scale" ); local color = getElementData( texts[i], "rgba" ); local maxDistance = getElementData( texts[i], "maxDistance" ); if not text or not tX or not tY or not tZ then return end if not font then font = "default" end if not scale then scale = 2 end if not color or type( color ) ~= "table" then color = { 255, 255, 255, 255 }; end if not maxDistance then maxDistance = 12 end local distance = getDistanceBetweenPoints3D( pX, pY, pZ, tX, tY, tZ ); if distance <= maxDistance then local x, y = getScreenFromWorldPosition( tX, tY, tZ ); if x and y then dxDrawText( text, x, y, _, _, tocolor( color[1], color[2], color[3], color[4] ), scale, font, "center", "center" ); end end end end end ); onduty_client.lua : addEvent ( "onDuty", true ) function duty() if getElementData(getLocalPlayer( ),"duty") == true then timer = setTimer ( function() setElementData(getLocalPlayer( ),"duty",true) local x, y, z = getElementPosition( getLocalPlayer( ) ) local playerName = getPlayerName( getLocalPlayer( ) ) local theText = dxDraw3DText( "ADMIN EN SERVICE ( Ne pas le tue )", x, y, z+1,05,"default",255,0,0,200) setTimer ( function() destroyElement(theText) end, 59, 1) end, 60, 0 ) else if isTimer(timer) then killTimer(timer) end setElementData(getLocalPlayer( ),"duty",true) end end addEventHandler ( "onDuty", getRootElement(), duty) addCommandHandler("duty",duty) onduty_server.lua : function duty(source) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Fondateur" ) ) then triggerEvent ( "onDuty", getRootElement()) else outputChatBox("Vous n'êtes pas ADMIN pour utilisé cette fonction !",source) end end addCommandHandler("duty",duty) Please help me with my script.
-
Me meta.xml :
-
[2013-12-24 18:14:16] Starting teleport-para [2013-12-24 18:14:16] WARNING: Script 'teleport-para/tp.lua' is not encoded in UTF-8. Loading as ANSI... [2013-12-24 18:14:16] SCRIPT ERROR: teleport-para/tp.lua:1: unexpected symbol near '?' [2013-12-24 18:14:16] ERROR: Loading script failed: teleport-para/tp.lua:1: unexpected symbol near '?' [2013-12-24 18:14:16] teleport-para restarted successfully It is still error...
-
[2013-12-24 18:07:50] SCRIPT ERROR: teleport-para/tp.lua:1: unexpected symbol near '?' [2013-12-24 18:07:50] ERROR: Loading script failed: teleport-para/tp.lua:1: unexpected symbol near '?'
-
Hello my script is bugged I'd like to know how to debug. error message consol : [2013-12-24 17:58:24] Starting teleport-para [2013-12-24 17:58:24] WARNING: Script 'teleport-para/tp.lua' is not encoded in UTF-8. Loading as ANSI... [2013-12-24 17:58:24] SCRIPT ERROR: teleport-para/tp.lua:1: unexpected symbol near '?' [2013-12-24 17:58:24] ERROR: Loading script failed: teleport-para/tp.lua:1: unexpected symbol near '?' I try to add a message at the teleportation : outputChatBox ( "Vous vous êtes teleporté !, thePlayer, 255, 255, 255 ) my code : function drift(gracz, cmd) setElementPosition(gracz, 1543.31995, -1360.21033, 329.46252) outputChatBox ( "Vous vous êtes teleporté !, thePlayer, 255, 255, 255 ) end addCommandHandler("para",drift)
-
thank you enormously !
-
Hello, I just had a problem with my script, I try to added this: local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then The following script: vehicle1 = createVehicle( 602 , -1271.66724, -73.05603, 13.74060, 0, 0, 47.857765197754 ) vehicle = createVehicle( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) function lockPrivate( player, seat, jacked ) if ( source == vehicle1 ) then local account = getPlayerAccount( player ) local accountName = ( account and getAccountName ( account ) or "" ) if not( accountName == "riding07" ) then cancelEvent() outputChatBox("Cette voiture appartient au joueurs: ProDrift|Riding07 ", player, 0, 245, 82, false) else outputChatBox("Bienvenue dans ta voiture Bonne route!", player, 0, 255, 0, false) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) setVehicleDamageProof(vehicle, true) This gives it : vehicle1 = createVehicle( 602 , 2014.77124, 2250.16650, 17.36250, 0, 0, 95.29736328125 ) vehicle = createVehicle( modelID, x, y, z, rotX, rotY, rotZ ) state = setVehicleDoorState ( vehicle, 1, 1 ) function lockPrivate( player, seat, jacked ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then cancelEvent() outputChatBox("Cette voiture appartient au joueurs: Admin ", player, 0, 245, 82, false) else outputChatBox("Bienvenue dans ta voiture Bonne route!", player, 0, 255, 0, false) end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) setVehicleDamageProof(vehicle, true) And the error is at line 14.I do not understand it or be able to come to the "end" Please help me [2013-12-24 16:37:45] ERROR: Loading script failed: 0-Voiture-Admin/veh-ACL.lua:14: '' expected near 'end'
-
I tried what you said but it still makes me the error. [2013-12-23 18:51:33] Starting PNJ [2013-12-23 18:51:33] SCRIPT ERROR: PNJ/server.lua:5: ')' expected near 'then' [2013-12-23 18:51:33] ERROR: Loading script failed: PNJ/server.lua:5: ')' expected near 'then'
-
Hello , I encountered a bug with my script, but I can not have the resourare you could help me, I have the error console shows me CODE : Server.lua function isMyPingTheLowest() local players = getElementsByType("player") local yes = true for i, player in ipairs(players) do if getPlayerPing(getLocalPlayer()) > getPlayerPing(player) then yes = false end end if yes == true then return true else return false end end function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end return t end addEventHandler("onClientPedDamage", getRootElement(), function(attacker) if getElementData(source, "type") == "ped.sniper.npc" and getElementData(attacker, "type") == "ped.sniper.npc" then cancelEvent() end end ) setTimer( function() if isMyPingTheLowest() then for i, peds in ipairs(getElementsByType("ped")) do if getElementData(peds, "type") == "ped.sniper.npc" and getElementHealth(peds) > 0 then local x, y, z = getElementPosition(peds) local lowest = 9999 local player = nil for i, players in ipairs(getElementsByType("player")) do local px, py, pz = getElementPosition(players) local dist = getDistanceBetweenPoints3D(x, y, z, px, py, pz) if dist < lowest and not getElementData( source, "isPro Drift" ) then lowest = dist player = players end end if isElement(player) then triggerServerEvent("sniperTakeDecision", getRootElement(), peds, player) end end end end end , 1500, 0) addEvent("sniperTakeDecisionClient", true) addEventHandler("sniperTakeDecisionClient", getRootElement(), function(sniperPedID, aimPlayer) local x, y, z = getElementPosition(sniperPedID) local px, py, pz = getElementPosition(aimPlayer) setPedAimTarget(sniperPedID, px, py, pz) local rotZ = findRotation(x, y, px, py) setPedRotation(sniperPedID, rotZ) setPedControlState(sniperPedID, "aim_weapon", true) setPedControlState(sniperPedID, "fire", true) setTimer( function() if isElement(sniperPedID) then setPedControlState(sniperPedID, "fire", false) setPedControlState(sniperPedID, "aim_weapon", false) end end , 500, 1) end ) Client.lua addEventHandler( "onPlayerJoin", root, function () local accName = getAccountName( getPlayerAccount( source ) ) if isObjectInACLGroup( "user."..accName, aclGetGroup ( "Pro Drift" ) ) then setElementData( source, "isPro Drift", true ) end end ) addEvent("sniperTakeDecision", true) addCommandHandler("sniper", function(thePlayer, command) local x, y, z = getElementPosition(thePlayer) local int = getElementInterior(thePlayer) local ped = createSniperPed(x, y, z) setElementInterior(ped, int) end ) setTimer( function() for i, peds in ipairs(getElementsByType("ped")) do if getElementData(peds, "type") == "ped.sniper.npc" and getElementHealth(peds) > 0 then setPedWeaponSlot(peds, 6) giveWeapon(peds, 24, 10000, true) end end end , 50, 0) function createSniperPed(x, y, z) local ped = createPed(120, x, y, z) setTimer( function() if isElement(ped) then giveWeapon(ped, 24, 10000, true) setPedWeaponSlot(ped, 6) setElementData(ped, "type", "ped.sniper.npc") setElementFrozen(ped, true) end end , 5000, 1) return ped end addEventHandler("sniperTakeDecision", getRootElement(), function(sniperPedID, aimPlayer) setElementData(sniperPedID, "target", aimPlayer) triggerClientEvent("sniperTakeDecisionClient", getRootElement(), sniperPedID, aimPlayer) end ) the error is here : [2013-12-23 18:26:47] ERROR: PNJ/server.lua:5: attempt to call global 'getLocalPlayer' (a nil value) Please help me
-
Excuse moi , mais je ne suis pas h24 sur le forum , et je n'avait pas le temps de pricisé car jdevait y allez et l'error viens d'ici ( j'ai chopé dans la console ) [2013-12-23 18:22:06] ERROR: PNJ/server.lua:5: attempt to call global 'getLocalPlayer' (a nil value)
-
Je viens de rencontré un problème c'est que quand je veux faire spawn le ped ( /sniper ) , ça ne fonctionne pas if getPlayerPing(getLocalPlayer()) > getPlayerPing(player) then Il me dit que ça viens de la , le debug script
-
Merci de ton aide. Je testerai ça dans la soirée.
-
Salut a tous j'ai trouvé un script pour que des Bot soit armé et tire sur tout le monde , j'aimerai savoir si c'est fesable qu'il tire sur tout le monde sauf des personne dans un ACL group ? Voiçi les code : Le client.lua function isMyPingTheLowest() local players = getElementsByType("player") local yes = true for i, player in ipairs(players) do if getPlayerPing(getLocalPlayer()) > getPlayerPing(player) then yes = false end end if yes == true then return true else return false end end function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end return t end addEventHandler("onClientPedDamage", getRootElement(), function(attacker) if getElementData(source, "type") == "ped.sniper.npc" and getElementData(attacker, "type") == "ped.sniper.npc" then cancelEvent() end end ) setTimer( function() if isMyPingTheLowest() then for i, peds in ipairs(getElementsByType("ped")) do if getElementData(peds, "type") == "ped.sniper.npc" and getElementHealth(peds) > 0 then local x, y, z = getElementPosition(peds) local lowest = nil local player = nil for i, players in ipairs(getElementsByType("player")) do local px, py, pz = getElementPosition(players) if getDistanceBetweenPoints3D(x, y, z, px, py, pz) < 100 then if lowest == nil then lowest = getDistanceBetweenPoints3D(x, y, z, px, py, pz) player = players else if getDistanceBetweenPoints3D(x, y, z, px, py, pz) < lowest then lowest = getDistanceBetweenPoints3D(x, y, z, px, py, pz) player = players end end end end if isElement(player) then triggerServerEvent("sniperTakeDecision", getRootElement(), peds, player) end end end end end , 1500, 0) addEvent("sniperTakeDecisionClient", true) addEventHandler("sniperTakeDecisionClient", getRootElement(), function(sniperPedID, aimPlayer) local x, y, z = getElementPosition(sniperPedID) local px, py, pz = getElementPosition(aimPlayer) setPedAimTarget(sniperPedID, px, py, pz) local rotZ = findRotation(x, y, px, py) setPedRotation(sniperPedID, rotZ) setPedControlState(sniperPedID, "aim_weapon", true) setPedControlState(sniperPedID, "fire", true) setTimer( function() if isElement(sniperPedID) then setPedControlState(sniperPedID, "fire", false) setPedControlState(sniperPedID, "aim_weapon", false) end end , 500, 1) end ) Le server.lua addEvent("sniperTakeDecision", true) addCommandHandler("sniper", function(thePlayer, command) local x, y, z = getElementPosition(thePlayer) local int = getElementInterior(thePlayer) local ped = createSniperPed(x, y, z) setElementInterior(ped, int) end ) setTimer( function() for i, peds in ipairs(getElementsByType("ped")) do if getElementData(peds, "type") == "ped.sniper.npc" and getElementHealth(peds) > 0 then setPedWeaponSlot(peds, 6) giveWeapon(peds, 31, 10000, true) end end end , 50, 0) function createSniperPed(x, y, z) local ped = createPed(120, x, y, z) setTimer( function() if isElement(ped) then giveWeapon(ped, 31, 10000, true) setPedWeaponSlot(ped, 6) setElementData(ped, "type", "ped.sniper.npc") setElementFrozen(ped, true) end end , 5000, 1) return ped end addEventHandler("sniperTakeDecision", getRootElement(), function(sniperPedID, aimPlayer) setElementData(sniperPedID, "target", aimPlayer) triggerClientEvent("sniperTakeDecisionClient", getRootElement(), sniperPedID, aimPlayer) end ) Merci d'avance
-
Ou ajouté la ligne pour un accés au admins
Furious^ONE! replied to Furious^ONE!'s topic in French / Français
J'ai testé celà : tor_op99 = createObject(980 , 2185.6999511719, -1767.5999755859 , 14, 0 ,0 ,0) tor_s_op99 = "zu" addCommandHandler("op99", function ( ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then if tor_s_op99 == "zu" then moveObject(tor_op99, 2000, 2185.6999511719 , -1767.5999755859 , 7) tor_s_op99 = "auf" else moveObject(tor_op99, 2000, 2185.6999511719 , -1767.5999755859 , 14) tor_s_op99 = "zu" end end Et le debug script m'a marqué ça : [17:07:24] SCRIPT ERROR: testing\script.lua:15: 'end' expected (to close 'function' at line 5) near '' [17:07:24] ERROR: Loading script failed: testing\script.lua:15: 'end' expected (to close 'function' at line 5) near '' -
Salut a tous j'aimerai savoir ou mettre la ligne suivante : local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then A ce script là : tor_op = createObject(980 , 1525.64, 122.0486 , 90.2, 0 ,0 ,0) tor_s_op = "zu" addCommandHandler("op", function ( ) if tor_s_op == "zu" then moveObject(tor_op, 2000, 1525.64 , 122.0486 , 83) tor_s_op = "auf" else moveObject(tor_op, 2000, 1525.64 , 122.0486 , 90.2) tor_s_op = "zu" end end) Merci d'avance.
-
D'accord Merci beaucoup
