Jump to content

Dinossauro

Members
  • Posts

    54
  • Joined

  • Last visited

Everything posted by Dinossauro

  1. Have you found my map. He is in the format. Map, fine. Now we just have to create the meta.xml, right? And what I put in it? I downloaded 1 map and meta.xml was this: <meta> <info gamemodes="race" type="map" name="Dinghy Race" author="Donfrancisco" version="1.0.0" /> <map src="Dinghy Race.map" dimension="0" /> <settings> <setting name="#skins" value='[ "cj" ]' /> <setting name="#maxplayers" value="[ 128 ]" /> <setting name="#gamespeed" value="[ 1 ]" /> <setting name="#ghostmode" value='[ "true" ]' /> <setting name="#time" value="12:0" /> <setting name="#vehicleweapons" value='[ "false" ]' /> <setting name="#minplayers" value="[ 0 ]" /> <setting name="#weather" value="[ 0 ]" /> <setting name="#gravity" value="[ 0.008000 ]" /> <setting name="#waveheight" value="[ 0 ]" /> <setting name="#respawntime" value="[ 5 ]" /> <setting name="#locked_time" value="[ false ]" /> <setting name="#duration" value="[ 1800 ]" /> <setting name="#respawn" value='[ "timelimit" ]' /> </settings> </meta> help... thanks
  2. Hello! I created a map for "map editor" within the MTA. Already accessed one site and converted this map to a code. Now I would like to know where to place this code. I would like to know how to put this map on my server MTA!
  3. You could replace these values ​​with any example? Thanks...
  4. What? O_o I do not quite understand, I'm Portuguese, my English is not so good.
  5. But how do I apply this script to the resource? It's not working.
  6. Could add to this script code that prohibits the use of color codes? Thank you.
  7. Hello I have a resource login and registration here, but I do not know what is the function to block certain characters and color codes. I wonder what is the function that prevents the creation of accounts with special characters and colors. Thank you.
  8. Dinossauro

    HELP-ME!

    Can you tell which function used to prohibit certain codes on login? For example, it can create nicks with color codes .. ex ¹: # ff0000LosT; ff0055Lost # .... And certain characters such as: ! / \. ° ¹ ² ³ ¹ ² ... Thanks!
  9. In the file there are several txds, ie the function will apply: engineImportTXD there is no one with the name: A51, could copy this? Because I'm confused. And where to put these txds are on file?
  10. How do I change this? Could you give an example?
  11. Hello I found this video on youtube: https://www.youtube.com/watch?feature=player_embedded&v=TkHNqlbLve8 If we apply it in GTA it modifies the base 51. DOWNLOAD: http://www.mediafire.com/?0jty7aoyo486930 I was wondering if it is possible to make a script of what to MTA Thanks!
  12. To remove, for example the LV-Pirate Boat, as it did?
  13. And as the use? How to combine? Could you explain, please?
  14. Hello I wish I knew how to edit objects own GTA? Example: LV-Pirate Boat I wonder how to remove and edit! Please help me, grateful.
  15. I wanted something like this: Who would use the command /exit back to the server with the ammunition, who uses the /quit or /reconnect not. /exit = /sair Please, help-me!
  16. Hello I have a scrip that is, players write / exit the chat and spent 5 seconds they disconnect! I wanted to add the following script: Who wrote / exit to enter the server again would munitions, who write / quit or / reconnect would not! script: function KickPlayer(thePlayer,reason) kickPlayer ( thePlayer, "Console", reason ) end function kickPlayerHandler ( sourcePlayer, commandname, kickedname, reason ) local reason = "Você saiu com sucesso." outputChatBox ( "Você vai sair do servidor, em 5 segundos." ) setTimer ( KickPlayer, 5000, 1, sourcePlayer,reason ) end addCommandHandler ( "sair", kickPlayerHandler) thanks!
  17. Hello! In this script there is a location on the map where players can buy drugs, there are several different lengths (1m. 2. Etc.) and who have to buy special effects, the screen is tremendous, almost can not aim, shaking trees, etc. .. . Only has 1 bug. The screen is mostly black! Codes: d_drug.lua --[[ Para se drogar, diriga-se à respetiva loja, marcada no mapa, compre a quantidade que quiser por um determinado dinheiro, irá ter vários efeitos visuais, esp. que goste! ]]-- function restoreWeather() local ww,bb = getWeather() triggerClientEvent(source, "restoreWeather", source, ww) end addEvent("restoreWeather", true) addEventHandler("restoreWeather", getRootElement(), restoreWeather) function takeMoney(howmuch) takePlayerMoney(source,tonumber(howmuch)) end addEvent("takeMoney", true) addEventHandler("takeMoney", getRootElement(), takeMoney) c_drug.lua function timeCheck() local hh, mm = getTime() if (hh<7) then local ww, bb = getWeather() if (ww ~= -52123) then setWeather(-52123) end else local ww, bb = getWeather() if (ww ~= 190) then setWeather(190) end end end function fall() if (isDrugActive) then setPedAnimation(getLocalPlayer(), "ped", "getup_front",1000, false, false) setTimer(function() fall() end, math.random(10000, 30000), 1) setTimer(function() setControlState ('jump',true) end, 1500, 1) setTimer(function() setControlState ('jump',false) end, 2000, 1) end end function fades() local rnd = math.random(2,4) fadeCamera(false, rnd, math.random(1,255), math.random(1,255), math.random(1,255)) local xx, yy, zz = getElementPosition(getLocalPlayer()) setTimer(function() fadeCamera(true, 1) end, rnd*1000/2, 1) end function drugSteer() left=false right=false up=false down=false local keys = getBoundKeys ('vehicle_left') if keys then tmpLeft = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpLeft=true end end if tmpLeft then left=true right=false end end local keys = getBoundKeys ('vehicle_right') if keys then tmpRight = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpRight=true end end if tmpRight then left=false right=true end end if (left) then setControlState('vehicle_left', false) setControlState('vehicle_right', true) elseif (right) then setControlState('vehicle_right', false) setControlState('vehicle_left', true) else setControlState('vehicle_right', false) setControlState('vehicle_left', false) end local keys = getBoundKeys ('accelerate') if keys then tmpUp = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpUp=true end end if tmpUp then down=false up=true end end local keys = getBoundKeys ('brake_reverse') if keys then tmpDown = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpDown=true end end if tmpDown then down=true up=false end end if (up) then setControlState('accelerate', false) setControlState('brake_reverse', true) elseif (down) then setControlState('brake_reverse', false) setControlState('accelerate', true) else setControlState('brake_reverse', false) setControlState('accelerate', false) end end roll = 0 rollGrow = false function drugCam() if (rollGrow) then if (roll > 15) then rollGrow = false end roll = roll + 1 else if (roll < -15) then rollGrow = true end roll = roll -1 end local xx, yy, zz = getElementPosition(getLocalPlayer()) local rot = getPedRotation(getLocalPlayer()) local lx = xx + math.sin (math.rad(-rot)) * -10 local ly = yy + math.cos (math.rad(-rot)) * -10 setCameraMatrix(lx, ly, zz + 4, xx, yy, zz, roll) fxAddBlood(xx, yy, zz, 0, 0, 0, 6) end function startDrug(time) fadeCamera(false) setTimer(function(time) if (time == nil) then time = 10*1000 else if (tonumber(time) < 5000) then tiaaame = 10*1000 end end timerWeather = setTimer(function() timeCheck() end, 1000) timerFades = setTimer(function() fades() end, 4000) isDrugActive = true setTimer(function() fall() end, 1000, 1) addEventHandler("onClientRender", getRootElement(), drugSteer) addEventHandler("onClientPreRender", getRootElement(), drugCam) setTimer(function() stopDrug() end, time, 1) end, 1500, 1, time) end function stopDrug() fadeCamera(false) killTimer(timerFades) killTimer(timerWeather) isDrugActive = false fadeCamera(false) removeEventHandler("onClientRender", getRootElement(), drugSteer) removeEventHandler("onClientPreRender", getRootElement(), drugCam) fadeCamera(false) triggerServerEvent("restoreWeather", getLocalPlayer()) setTimer(function() setCameraTarget(getLocalPlayer()) fadeCamera(true) end, 2500, 1) end function startDrug2() startDrug(4) end function stopDrug2() stopDrug() end --addCommandHandler("sd", startDrug2) --addCommandHandler("sds", stopDrug2) function restoreWeather(ww) setWeather(ww) end addEvent("restoreWeather", true) addEventHandler("restoreWeather", getRootElement(), restoreWeather) function missionStart(whichMouse, state, absoluteX, absoluteY) local number = getElementData(source,"number") -- this is the button "id" local money=getPlayerMoney(getLocalPlayer()) if (number=='a') then if (money>=1000) then startDrug(1*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),5000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end elseif (number=='b') then if (money>=3000) then startDrug(3*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),10000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end elseif (number=='c') then if (money>=5000) then startDrug(6*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),15000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end else if (money>=8000) then startDrug(10*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),20000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end end --outputChatBox("#00ff00\"dfdf\" #ffffff started!",255,255,255,true) guiSetVisible (missionSelectWindow1, false) showCursor (false) end -- this fires when player hits the marker function missionSelect(hitPlayer, matchingDimension) if (hitPlayer == getLocalPlayer()) and (isPedOnGround (getLocalPlayer()) and not isPedInVehicle(hitPlayer)) then if isDrugActive then outputChatBox("Tu já estas drogado. Queres morrer?", 255, 0, 0) else guiSetVisible (missionSelectWindow1, true) guiBringToFront (missionSelectWindow1) showCursor (true) end end end function guiCancel () guiSetVisible (missionSelectWindow1, false)
  18. Hello I have one script. In the script there is a place on the map where they sell drugs. script: s_drug.lua --[[ Para se drogar, diriga-se à respetiva loja, marcada no mapa, compre a quantidade que quiser por um determinado dinheiro, irá ter vários efeitos visuais, esp. que goste! ]]-- function restoreWeather() local ww,bb = getWeather() triggerClientEvent(source, "restoreWeather", source, ww) end addEvent("restoreWeather", true) addEventHandler("restoreWeather", getRootElement(), restoreWeather) function takeMoney(howmuch) takePlayerMoney(source,tonumber(howmuch)) end addEvent("takeMoney", true) addEventHandler("takeMoney", getRootElement(), takeMoney) c_drug.lua function timeCheck() local hh, mm = getTime() if (hh<7) then local ww, bb = getWeather() if (ww ~= -52123) then setWeather(-52123) end else local ww, bb = getWeather() if (ww ~= 190) then setWeather(190) end end end function fall() if (isDrugActive) then setPedAnimation(getLocalPlayer(), "ped", "getup_front",1000, false, false) setTimer(function() fall() end, math.random(10000, 30000), 1) setTimer(function() setControlState ('jump',true) end, 1500, 1) setTimer(function() setControlState ('jump',false) end, 2000, 1) end end function fades() local rnd = math.random(2,4) fadeCamera(false, rnd, math.random(1,255), math.random(1,255), math.random(1,255)) local xx, yy, zz = getElementPosition(getLocalPlayer()) setTimer(function() fadeCamera(true, 1) end, rnd*1000/2, 1) end function drugSteer() left=false right=false up=false down=false local keys = getBoundKeys ('vehicle_left') if keys then tmpLeft = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpLeft=true end end if tmpLeft then left=true right=false end end local keys = getBoundKeys ('vehicle_right') if keys then tmpRight = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpRight=true end end if tmpRight then left=false right=true end end if (left) then setControlState('vehicle_left', false) setControlState('vehicle_right', true) elseif (right) then setControlState('vehicle_right', false) setControlState('vehicle_left', true) else setControlState('vehicle_right', false) setControlState('vehicle_left', false) end local keys = getBoundKeys ('accelerate') if keys then tmpUp = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpUp=true end end if tmpUp then down=false up=true end end local keys = getBoundKeys ('brake_reverse') if keys then tmpDown = false for keyName, state in pairs(keys) do if (getKeyState(keyName)) then tmpDown=true end end if tmpDown then down=true up=false end end if (up) then setControlState('accelerate', false) setControlState('brake_reverse', true) elseif (down) then setControlState('brake_reverse', false) setControlState('accelerate', true) else setControlState('brake_reverse', false) setControlState('accelerate', false) end end roll = 0 rollGrow = false function drugCam() if (rollGrow) then if (roll > 15) then rollGrow = false end roll = roll + 1 else if (roll < -15) then rollGrow = true end roll = roll -1 end local xx, yy, zz = getElementPosition(getLocalPlayer()) local rot = getPedRotation(getLocalPlayer()) local lx = xx + math.sin (math.rad(-rot)) * -10 local ly = yy + math.cos (math.rad(-rot)) * -10 setCameraMatrix(lx, ly, zz + 4, xx, yy, zz, roll) fxAddBlood(xx, yy, zz, 0, 0, 0, 6) end function startDrug(time) fadeCamera(false) setTimer(function(time) if (time == nil) then time = 10*1000 else if (tonumber(time) < 5000) then tiaaame = 10*1000 end end timerWeather = setTimer(function() timeCheck() end, 1000) timerFades = setTimer(function() fades() end, 4000) isDrugActive = true setTimer(function() fall() end, 1000, 1) addEventHandler("onClientRender", getRootElement(), drugSteer) addEventHandler("onClientPreRender", getRootElement(), drugCam) setTimer(function() stopDrug() end, time, 1) end, 1500, 1, time) end function stopDrug() fadeCamera(false) killTimer(timerFades) killTimer(timerWeather) isDrugActive = false fadeCamera(false) removeEventHandler("onClientRender", getRootElement(), drugSteer) removeEventHandler("onClientPreRender", getRootElement(), drugCam) fadeCamera(false) triggerServerEvent("restoreWeather", getLocalPlayer()) setTimer(function() setCameraTarget(getLocalPlayer()) fadeCamera(true) end, 2500, 1) end function startDrug2() startDrug(4) end function stopDrug2() stopDrug() end --addCommandHandler("sd", startDrug2) --addCommandHandler("sds", stopDrug2) function restoreWeather(ww) setWeather(ww) end addEvent("restoreWeather", true) addEventHandler("restoreWeather", getRootElement(), restoreWeather) function missionStart(whichMouse, state, absoluteX, absoluteY) local number = getElementData(source,"number") -- this is the button "id" local money=getPlayerMoney(getLocalPlayer()) if (number=='a') then if (money>=1000) then startDrug(1*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),5000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end elseif (number=='b') then if (money>=3000) then startDrug(3*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),10000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end elseif (number=='c') then if (money>=5000) then startDrug(6*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),15000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end else if (money>=8000) then startDrug(10*60*1000) triggerServerEvent("takeMoney", getLocalPlayer(),20000) else outputChatBox("Não tens dinheiro suficiente!", 255, 0, 0) end end --outputChatBox("#00ff00\"dfdf\" #ffffff started!",255,255,255,true) guiSetVisible (missionSelectWindow1, false) showCursor (false) end -- this fires when player hits the marker function missionSelect(hitPlayer, matchingDimension) if (hitPlayer == getLocalPlayer()) and (isPedOnGround (getLocalPlayer()) and not isPedInVehicle(hitPlayer)) then if isDrugActive then outputChatBox("Tu já estas drogado. Queres morrer?", 255, 0, 0) else guiSetVisible (missionSelectWindow1, true) guiBringToFront (missionSelectWindow1) showCursor (true) end end end function guiCancel () guiSetVisible (missionSelectWindow1, false)
  19. And what value to place on the top right? Please help me!
  20. And how do I put killmessages in the upper right? As this image: http://i50.tinypic.com/2uepv83.png
  21. Hello I have a script, killmessages. I created a server and wanted the race killmessages appear in the upper right. See a picture here! And also wanted nicks who died appeared with colors, when they appear like this: # FF0000Dinossauro. Codes: killmessages_client.lua addEvent ("onClientPlayerKillMessage",true) function onClientPlayerKillMessage ( killer,weapon,wr,wg,wb,kr,kg,kb,width,resource ) if wasEventCancelled() then return end outputKillMessage ( source, wr,wg,wb,killer,kr,kg,kb,weapon,width,resource ) end addEventHandler ("onClientPlayerKillMessage",getRootElement(),onClientPlayerKillMessage) function outputKillMessage ( source, wr,wg,wb,killer,kr,kg,kb,weapon,width,resource ) if not iconWidths[weapon] then if type(weapon) ~= "string" then weapon = 999 end end local killerName local wastedName if not tonumber(wr) then wr = 255 end if not tonumber(wg) then wg = 255 end if not tonumber(wb) then wb = 255 end if not tonumber(kr) then kr = 255 end if not tonumber(kg) then kg = 255 end if not tonumber(kb) then kb = 255 end if ( source ) then if isElement ( source ) then if getElementType ( source ) == "player" then wastedName = getPlayerName ( source ) else outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end elseif type(source) == "string" then wastedName = source end else outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end if ( killer ) then if isElement ( killer ) then if getElementType ( killer ) == "player" then killerName = getPlayerName ( killer ) else outputDebugString ( "outputKillMessage - Invalid 'killer' player specified",0,0,0,100) return false end elseif type(killer) == "string" then killerName = killer else killerName = "" end else killerName = "" end --create the new text if not killerName then killerName = "" end return outputMessage ( {killerName, {"padding",width=3}, {"icon",id=weapon}, {"padding",width=3},{"color",r=wr,g=wg,b=wb}, wastedName}, kr,kg,kb ) end killmessages_server.lua local config = { ["lines"] = 5, ["startY"] = 0.35, ["textHeight"] = 16, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local default = { ["lines"] = 5, ["startY"] = 0.25, ["textHeight"] = 16, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local vehicleIDs = { [50]=true,[49]=true,[31]=true,[38]=true,[52]=true } function KillMessages_onPlayerWasted ( totalammo, killer, killerweapon, bodypart ) ---These are special checks for certain kill types local usedVehicle if killerweapon == 19 and isElement(killer) then --rockets killerweapon = killer and getElementType ( killer ) == "player" and getPedWeapon(killer) if not killerweapon then killerweapon = 51 end elseif vehicleIDs[killerweapon] then --heliblades/rammed if ( isElement(killer) and getElementType ( killer ) == "vehicle" ) then usedVehicle = getElementModel ( killer ) killer = getVehicleOccupant ( killer, 0 ) end elseif ( killerweapon == 59 and isElement(killer) ) then if ( getElementType ( killer ) == "player" ) then local vehicle = getPedOccupiedVehicle(killer) if ( vehicle ) then usedVehicle = getElementModel ( vehicle ) end end end --finish this -- Got a killer? Print the normal "* X died" if not if ( killer and isElement(killer) and getElementType ( killer ) == "player" ) then local kr,kg,kb = getPlayerNametagColor ( killer ) if getPlayerTeam ( killer ) then kr,kg,kb = getTeamColor ( getPlayerTeam ( killer ) ) end -- Suicide? if (source == killer) then if not killerweapon then killerweapon = 255 end local triggered = triggerEvent ( "onPlayerKillMessage", source,false,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,false,killerweapon,bodypart,true,usedVehicle) return end end local triggered = triggerEvent ( "onPlayerKillMessage", source,killer,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,killer,killerweapon,bodypart,false,usedVehicle) end else local triggered = triggerEvent ( "onPlayerKillMessage", source,false,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,false,killerweapon,bodypart,false,usedVehicle) end end end addEventHandler ( "onPlayerWasted", getRootElement(), KillMessages_onPlayerWasted ) addEvent ( "onPlayerKillMessage" ) function eventTriggered ( source,killer,weapon,bodypart,suicide,usedVehicle ) local wr,wg,wb = getPlayerNametagColor ( source ) if getPlayerTeam ( source ) then wr,wg,wb = getTeamColor ( getPlayerTeam ( source ) ) end local kr,kg,kb = false,false,false if ( killer ) then kr,kg,kb = getPlayerNametagColor ( killer ) if getPlayerTeam ( killer ) then kr,kg,kb = getTeamColor ( getPlayerTeam ( killer ) ) end end if ( usedVehicle ) then weapon = usedVehicle end outputKillMessage ( source, wr,wg,wb,killer,kr,kg,kb,weapon ) -- local extra = "" if ( usedVehicle ) then extra = " (Vehicle)" end if ( killer ) then if suicide then local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(source).." killed himself. ("..weaponName..")" ) else outputConsoleKillMessage ( "* "..getPlayerName(source).." killed himself."..extra ) end else local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed "..getPlayerName(source)..". ("..weaponName..")" ) else outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed "..getPlayerName(source).."."..extra ) end end else outputConsoleKillMessage ( "* "..getPlayerName(source).." died."..extra ) end -- end function outputConsoleKillMessage ( text ) outputConsole ( text ) end function outputKillMessage ( killed, wr,wg,wb,killer,kr,kg,kb,weapon,width,resource ) if ( resource ) then resource = getResourceName(resource) end if not isElement(killed) then outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end if not getElementType(killed) == "player" then outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end return triggerClientEvent(getRootElement(),"onClientPlayerKillMessage",killed,killer,weapon,wr,wg,wb,kr,kg,kb,width,resource ) end function outputMessage ( message, visibleTo, r, g, b, font ) if type(message) ~= "string" and type(message) ~= "table" then outputDebugString ( "outputMessage - Bad 'message' argument", 0, 112, 112, 112 ) return false end if not isElement(visibleTo) then outputDebugString ( "outputMessage - Bad argument", 0, 112, 112, 112 ) return false end --Turn any resources into resource names if type(message) == "table" then for i,part in ipairs(message) do if type(part) == "table" and part[1] == "image" then if part.resource then message[i].resourceName = getResourceName(part.resource) else part.resourceName = getResourceName(sourceResource) end end end end return triggerClientEvent ( visibleTo, "doOutputMessage", visibleTo, message, r, g, b, font ) end function setKillMessageStyle ( startX,startY,align,lines,fadeStart,fadeAnimTime ) if ( not startX ) then startX = default.startX end if ( not startY ) then startY = default.startY end if ( not align ) then startY = align.startY end if ( not lines ) then lines = default.lines end if ( not fadeStart ) then fadeStart = default.startFade end if ( not fadeAnimTime ) then fadeAnimTime = default.fadeTime end config.startX = startX config.startY = startY config.align = align config.lines = lines config.startFade = fadeStart config.fadeTime = fadeAnimTime for k,v in ipairs(getElementsByType"player") do triggerClientEvent(v,"doSetKillMessageStyle",v,config.startX,config.startY,config.alignX,config.lines,config.startFade,config.fadeTime) end return true end addEvent ("onClientKillmessagesLoaded",true) addEventHandler ( "onClientKillmessagesLoaded", getRootElement(), function() triggerClientEvent(source,"doSetKillMessageStyle",source,config.startX,config.startY,config.alignX,config.lines,config.startFade,config.fadeTime) end ) gui.lua local customKills = {} local config = { ["lines"] = 5, ["startY"] = 0.35, ["textHeight"] = 16, ["iconPosOffY"] = -10, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local default = { ["lines"] = 5, ["startY"] = 0.25, ["textHeight"] = 16, ["iconPosOffY"] = -10, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local endTime local screenX,screenY = guiGetScreenSize () local contentMessages = {} local fadingLines = {} --- local iconOrder = {} function setupTextOnStart ( resource ) if resource ~= getThisResource() then return end triggerServerEvent ( "onClientKillmessagesLoaded", getLocalPlayer() ) end addEventHandler ( "onClientResourceStart", getRootElement(), setupTextOnStart ) addEvent ("doSetKillMessageStyle",true) function setKillMessageStyle ( startX,startY,align,lines,fadeStart,fadeAnimTime ) if ( not startX ) then startX = default.startX end if ( not startY ) then startY = default.startY end if ( not align ) then align = default.align end if ( not lines ) then lines = default.lines end if ( not fadeStart ) then fadeStart = default.startFade end if ( not fadeAnimTime ) then fadeAnimTime = default.fadeTime end config.startX = startX config.startY = startY config.align = align config.lines = lines config.startFade = fadeStart config.fadeTime = fadeAnimTime if #contentMessages ~= 0 then for i=1,config.lines do if contentMessages[i] then destroyLine ( i ) end end end fadingLines = {} killMessages = {} if ( config.startY < 0 ) then config.startY = screenY - math.abs(config.startY*screenY) - (config.iconHeight*config.lines) config.startY = config.startY/screenY end createKillMessageGUI() return true end addEventHandler ( "doSetKillMessageStyle",getRootElement(),setKillMessageStyle) function createKillMessageGUI() local gap = config.iconHeight - config.textHeight gap = gap/2 for i=1,config.lines do local y = config.startY*screenY + (config.iconHeight*(i-1)) y = y + gap contentMessages[i] = { dxText:create("",0,y) } end endTime = config.fadeTime + config.startFade end function shiftUpGUI() local i = 1 for i=config.lines,2,-1 do local y = config.startY*screenY + (config.iconHeight*(i-1)) + (config.iconHeight - config.textHeight)/2 local targetY = config.startY*screenY + (config.iconHeight*(i-2)) + (config.iconHeight - config.textHeight)/2 if contentMessages[i] then for k,part in ipairs(contentMessages[i]) do local x,realY = getWidgetPosition(part) local diffY = realY - y setWidgetPosition(part,x,targetY + diffY) end end end for i=1,config.lines-1 do ---shift up the alpha too local tick = fadingLines[i+1] fadingLines[i] = tick fadingLines[i+1] = nil end end addEvent ( "doOutputMessage", true ) function outputMessage ( message, r, g, b, font ) if type(message) ~= "string" and type(message) ~= "table" then outputDebugString ( "outputMessage - Bad 'message' argument", 0, 112, 112, 112 ) return false end if type(font) ~= "string" then font = "default" end r = tonumber(r) or 255 g = tonumber(g) or 255 b = tonumber(b) or 255 ---shift everything up shiftUpGUI() --Delete the first line destroyLine (1) table.remove ( contentMessages, 1 ) if type(message) == "string" then message = {message} end local y = config.startY*screenY + (config.iconHeight*(config.lines-1)) + (config.iconHeight - config.textHeight)/2 local startX = config.startX if startX < 1 and startX > -1 then --auto calculate whether its relative or absolute startX = screenX/startX --make it relative end if startX < 0 then startX = screenX + startX end for i,part in ipairs(message) do if type(part) == "table" and part[1] == "image" then if not part.resource and not part.resourceName then part.resource = sourceResource end end end drawLine ( message, startX, y, config.align, config.lines, r, g, b, font, 1 ) fadeLine ( config.lines ) end addEventHandler ( "doOutputMessage", getRootElement(), outputMessage ) function drawLine ( message, x,y, align, line, r, g, b, font, scale ) --First draw it and work out the width local width = 0 contentMessages[line] = {} for i,part in ipairs(message) do if type(part) == "string" then local text = dxText:create ( part, width, y, false ) text:font ( font ) text:scale ( scale ) text:type("shadow",1) text:align"left" text:color ( r,g,b ) table.insert ( contentMessages[line], text ) width = width + text:extent() elseif part[1] == "icon" then local iconWidth = part.width or iconWidths[part.id or -1] or iconWidths[255] local iconHeight = part.height or config.iconHeight local image = dxImage:create ( icons[part.id or 0] or icons[255], width, y + (part.posOffY or config.iconPosOffY), iconWidth, iconHeight, false ) image:color ( part.r or 255, part.g or 255, part.b or 255 ) image:rotation ( part.rot or 0, part.rotOffX or 0, part.rotOffY or 0 ) width = width + iconWidth table.insert ( contentMessages[line], image ) elseif part[1] == "image" then if part.width and part.path then if part.resourceName then part.resource = getResourceFromName(tostring(part.resourceName)) or part.resource end local image = dxImage:create ( ":"..getResourceName(part.resource).."/"..part.path, width, y + (part.posOffY or config.iconPosOffY), part.width, part.height or config.iconHeight, false ) image:color ( part.r or 255, part.g or 255, part.b or 255 ) image:rotation ( part.rot or 0, part.rotOffX or 0, part.rotOffY or 0 ) width = width + part.width table.insert ( contentMessages[line], image ) end elseif part[1] == "color" or part[1] == "colour" then r = part.r or r g = part.g or g b = part.b or b elseif part[1] == "padding" then width = width + part.width or 0 end contentMessages[line].scale = scale end --Now reposition everything properly if align == "center" or align == "centre" then x = x - width/2 elseif align == "right" then x = x - width end for i,widget in ipairs(contentMessages[line]) do local wx,wy = getWidgetPosition ( widget ) setWidgetPosition ( widget, x + wx, wy ) end return true end function fadeLine ( line ) setLineAlpha ( line, 1 ) fadingLines[line] = getTickCount() end ----- addEventHandler ( "onClientRender",getRootElement(), function() for line,originalTick in pairs(fadingLines) do local tickDifference = getTickCount() - originalTick if tickDifference > endTime then destroyLine ( line ) setLineAlpha ( line, 1 ) fadingLines[line] = nil elseif tickDifference > config.startFade then local fadeTimeDifference = tickDifference - config.startFade --calculate the alpha local newAlpha = 1 - fadeTimeDifference/config.fadeTime --Set all the alphas setLineAlpha ( line, newAlpha ) end end end ) function setLineAlpha ( line, alpha ) for i,part in ipairs(contentMessages[line]) do setWidgetAlpha ( part, alpha ) end end function destroyLine ( line ) for k,part in ipairs(contentMessages[line]) do destroyWidget(part) end contentMessages[line] = {} end function destroyWidget ( widget ) if isElement(widget) then destroyElement ( widget ) elseif type(widget) == "table" and widget.destroy then widget:destroy() end end function getWidgetPosition ( widget ) if isElement(widget) then return guiGetPosition ( widget, false ) elseif
  22. I have a script that is killmessages. I have a server and wanted to race that deaths and stay on the right side that showed up the colors of whom died, because only appears: # FF0000, killmessages_server.lua local config = { ["lines"] = 5, ["startY"] = 0.35, ["textHeight"] = 16, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local default = { ["lines"] = 5, ["startY"] = 0.25, ["textHeight"] = 16, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local vehicleIDs = { [50]=true,[49]=true,[31]=true,[38]=true,[52]=true } function KillMessages_onPlayerWasted ( totalammo, killer, killerweapon, bodypart ) ---These are special checks for certain kill types local usedVehicle if killerweapon == 19 and isElement(killer) then --rockets killerweapon = killer and getElementType ( killer ) == "player" and getPedWeapon(killer) if not killerweapon then killerweapon = 51 end elseif vehicleIDs[killerweapon] then --heliblades/rammed if ( isElement(killer) and getElementType ( killer ) == "vehicle" ) then usedVehicle = getElementModel ( killer ) killer = getVehicleOccupant ( killer, 0 ) end elseif ( killerweapon == 59 and isElement(killer) ) then if ( getElementType ( killer ) == "player" ) then local vehicle = getPedOccupiedVehicle(killer) if ( vehicle ) then usedVehicle = getElementModel ( vehicle ) end end end --finish this -- Got a killer? Print the normal "* X died" if not if ( killer and isElement(killer) and getElementType ( killer ) == "player" ) then local kr,kg,kb = getPlayerNametagColor ( killer ) if getPlayerTeam ( killer ) then kr,kg,kb = getTeamColor ( getPlayerTeam ( killer ) ) end -- Suicide? if (source == killer) then if not killerweapon then killerweapon = 255 end local triggered = triggerEvent ( "onPlayerKillMessage", source,false,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,false,killerweapon,bodypart,true,usedVehicle) return end end local triggered = triggerEvent ( "onPlayerKillMessage", source,killer,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,killer,killerweapon,bodypart,false,usedVehicle) end else local triggered = triggerEvent ( "onPlayerKillMessage", source,false,killerweapon,bodypart ) --outputDebugString ( "Cancelled: "..tostring(triggered) ) if ( triggered ) then eventTriggered ( source,false,killerweapon,bodypart,false,usedVehicle) end end end addEventHandler ( "onPlayerWasted", getRootElement(), KillMessages_onPlayerWasted ) addEvent ( "onPlayerKillMessage" ) function eventTriggered ( source,killer,weapon,bodypart,suicide,usedVehicle ) local wr,wg,wb = getPlayerNametagColor ( source ) if getPlayerTeam ( source ) then wr,wg,wb = getTeamColor ( getPlayerTeam ( source ) ) end local kr,kg,kb = false,false,false if ( killer ) then kr,kg,kb = getPlayerNametagColor ( killer ) if getPlayerTeam ( killer ) then kr,kg,kb = getTeamColor ( getPlayerTeam ( killer ) ) end end if ( usedVehicle ) then weapon = usedVehicle end outputKillMessage ( source, wr,wg,wb,killer,kr,kg,kb,weapon ) -- local extra = "" if ( usedVehicle ) then extra = " (Vehicle)" end if ( killer ) then if suicide then local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(source).." killed himself. ("..weaponName..")" ) else outputConsoleKillMessage ( "* "..getPlayerName(source).." killed himself."..extra ) end else local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed "..getPlayerName(source)..". ("..weaponName..")" ) else outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed "..getPlayerName(source).."."..extra ) end end else outputConsoleKillMessage ( "* "..getPlayerName(source).." died."..extra ) end -- end function outputConsoleKillMessage ( text ) outputConsole ( text ) end function outputKillMessage ( killed, wr,wg,wb,killer,kr,kg,kb,weapon,width,resource ) if ( resource ) then resource = getResourceName(resource) end if not isElement(killed) then outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end if not getElementType(killed) == "player" then outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end return triggerClientEvent(getRootElement(),"onClientPlayerKillMessage",killed,killer,weapon,wr,wg,wb,kr,kg,kb,width,resource ) end function outputMessage ( message, visibleTo, r, g, b, font ) if type(message) ~= "string" and type(message) ~= "table" then outputDebugString ( "outputMessage - Bad 'message' argument", 0, 112, 112, 112 ) return false end if not isElement(visibleTo) then outputDebugString ( "outputMessage - Bad argument", 0, 112, 112, 112 ) return false end --Turn any resources into resource names if type(message) == "table" then for i,part in ipairs(message) do if type(part) == "table" and part[1] == "image" then if part.resource then message.resourceName = getResourceName(part.resource) else part.resourceName = getResourceName(sourceResource) end end end end return triggerClientEvent ( visibleTo, "doOutputMessage", visibleTo, message, r, g, b, font ) end function setKillMessageStyle ( startX,startY,align,lines,fadeStart,fadeAnimTime ) if ( not startX ) then startX = default.startX end if ( not startY ) then startY = default.startY end if ( not align ) then startY = align.startY end if ( not lines ) then lines = default.lines end if ( not fadeStart ) then fadeStart = default.startFade end if ( not fadeAnimTime ) then fadeAnimTime = default.fadeTime end config.startX = startX config.startY = startY config.align = align config.lines = lines config.startFade = fadeStart config.fadeTime = fadeAnimTime for k,v in ipairs(getElementsByType"player") do triggerClientEvent(v,"doSetKillMessageStyle",v,config.startX,config.startY,config.alignX,config.lines,config.startFade,config.fadeTime) end return true end addEvent ("onClientKillmessagesLoaded",true) addEventHandler ( "onClientKillmessagesLoaded", getRootElement(), function() triggerClientEvent(source,"doSetKillMessageStyle",source,config.startX,config.startY,config.alignX,config.lines,config.startFade,config.fadeTime) end ) killmessages_client.lua addEvent ("onClientPlayerKillMessage",true) function onClientPlayerKillMessage ( killer,weapon,wr,wg,wb,kr,kg,kb,width,resource ) if wasEventCancelled() then return end outputKillMessage ( source, wr,wg,wb,killer,kr,kg,kb,weapon,width,resource ) end addEventHandler ("onClientPlayerKillMessage",getRootElement(),onClientPlayerKillMessage) function outputKillMessage ( source, wr,wg,wb,killer,kr,kg,kb,weapon,width,resource ) if not iconWidths[weapon] then if type(weapon) ~= "string" then weapon = 999 end end local killerName local wastedName if not tonumber(wr) then wr = 255 end if not tonumber(wg) then wg = 255 end if not tonumber(wb) then wb = 255 end if not tonumber(kr) then kr = 255 end if not tonumber(kg) then kg = 255 end if not tonumber(kb) then kb = 255 end if ( source ) then if isElement ( source ) then if getElementType ( source ) == "player" then wastedName = getPlayerName ( source ) else outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end elseif type(source) == "string" then wastedName = source end else outputDebugString ( "outputKillMessage - Invalid 'wasted' player specified",0,0,0,100) return false end if ( killer ) then if isElement ( killer ) then if getElementType ( killer ) == "player" then killerName = getPlayerName ( killer ) else outputDebugString ( "outputKillMessage - Invalid 'killer' player specified",0,0,0,100) return false end elseif type(killer) == "string" then killerName = killer else killerName = "" end else killerName = "" end --create the new text if not killerName then killerName = "" end return outputMessage ( {killerName, {"padding",width=3}, {"icon",id=weapon}, {"padding",width=3},{"color",r=wr,g=wg,b=wb}, wastedName}, kr,kg,kb ) end gui.lua local customKills = {} local config = { ["lines"] = 5, ["startY"] = 0.35, ["textHeight"] = 16, ["iconPosOffY"] = -10, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local default = { ["lines"] = 5, ["startY"] = 0.25, ["textHeight"] = 16, ["iconPosOffY"] = -10, ["iconHeight"] = 20, ["iconSpacing"] = 4, ["defaultWeapon"] = 255, ["fadeTime"] = 5000, ["startFade"] = 15000, ["align"] = "right", ["startX"] = -10 } local endTime local screenX,screenY = guiGetScreenSize () local contentMessages = {} local fadingLines = {} --- local iconOrder = {} function setupTextOnStart ( resource ) if resource ~= getThisResource() then return end triggerServerEvent ( "onClientKillmessagesLoaded", getLocalPlayer() ) end addEventHandler ( "onClientResourceStart", getRootElement(), setupTextOnStart ) addEvent ("doSetKillMessageStyle",true) function setKillMessageStyle ( startX,startY,align,lines,fadeStart,fadeAnimTime ) if ( not startX ) then startX = default.startX end if ( not startY ) then startY = default.startY end if ( not align ) then align = default.align end if ( not lines ) then lines = default.lines end if ( not fadeStart ) then fadeStart = default.startFade end if ( not fadeAnimTime ) then fadeAnimTime = default.fadeTime end config.startX = startX config.startY = startY config.align = align config.lines = lines config.startFade = fadeStart config.fadeTime = fadeAnimTime if #contentMessages ~= 0 then for i=1,config.lines do if contentMessages then destroyLine ( i ) end end end fadingLines = {} killMessages = {} if ( config.startY < 0 ) then config.startY = screenY - math.abs(config.startY*screenY) - (config.iconHeight*config.lines) config.startY = config.startY/screenY end createKillMessageGUI() return true end addEventHandler ( "doSetKillMessageStyle",getRootElement(),setKillMessageStyle) function createKillMessageGUI() local gap = config.iconHeight - config.textHeight gap = gap/2 for i=1,config.lines do local y = config.startY*screenY + (config.iconHeight*(i-1)) y = y + gap contentMessages = { dxText:create("",0,y) } end endTime = config.fadeTime + config.startFade end function shiftUpGUI() local i = 1 for i=config.lines,2,-1 do local y = config.startY*screenY + (config.iconHeight*(i-1)) + (config.iconHeight - config.textHeight)/2 local targetY = config.startY*screenY + (config.iconHeight*(i-2)) + (config.iconHeight - config.textHeight)/2 if contentMessages then for k,part in ipairs(contentMessages) do local x,realY = getWidgetPosition(part) local diffY = realY - y setWidgetPosition(part,x,targetY + diffY) end end end for i=1,config.lines-1 do ---shift up the alpha too local tick = fadingLines[i+1] fadingLines = tick fadingLines[i+1] = nil end end addEvent ( "doOutputMessage", true ) function outputMessage ( message, r, g, b, font ) if type(message) ~= "string" and type(message) ~= "table" then outputDebugString ( "outputMessage - Bad 'message' argument", 0, 112, 112, 112 ) return false end if type(font) ~= "string" then font = "default" end r = tonumber® or 255 g = tonumber(g) or 255 b = tonumber(b) or 255 ---shift everything up shiftUpGUI() --Delete the first line destroyLine (1) table.remove ( contentMessages, 1 ) if type(message) == "string" then message = {message} end local y = config.startY*screenY + (config.iconHeight*(config.lines-1)) + (config.iconHeight - config.textHeight)/2 local startX = config.startX if startX < 1 and startX > -1 then --auto calculate whether its relative or absolute startX = screenX/startX --make it relative end if startX < 0 then startX = screenX + startX end for i,part in ipairs(message) do if type(part) == "table" and part[1] == "image" then if not part.resource and not part.resourceName then part.resource = sourceResource end end end drawLine ( message, startX, y, config.align, config.lines, r, g, b, font, 1 ) fadeLine ( config.lines ) end addEventHandler ( "doOutputMessage", getRootElement(), outputMessage ) function drawLine ( message, x,y, align, line, r, g, b, font, scale ) --First draw it and work out the width local width = 0 contentMessages[line] = {} for i,part in ipairs(message) do if type(part) == "string" then local text = dxText:create ( part, width, y, false ) text:font ( font ) text:scale ( scale ) text:type("shadow",1) text:align"left" text:color ( r,g,b ) table.insert ( contentMessages[line], text ) width = width + text:extent() elseif part[1] == "icon" then local iconWidth = part.width or iconWidths[part.id or -1] or iconWidths[255] local iconHeight = part.height or config.iconHeight local image = dxImage:create ( icons[part.id or 0] or icons[255], width, y + (part.posOffY or config.iconPosOffY), iconWidth, iconHeight, false ) image:color ( part.r or 255, part.g or 255, part.b or 255 ) image:rotation ( part.rot or 0, part.rotOffX or 0, part.rotOffY or 0 ) width = width + iconWidth table.insert ( contentMessages[line], image ) elseif part[1] == "image" then if part.width and part.path then if part.resourceName then part.resource = getResourceFromName(tostring(part.resourceName)) or part.resource end local image = dxImage:create ( ":"..getResourceName(part.resource).."/"..part.path, width, y + (part.posOffY or config.iconPosOffY), part.width, part.height or config.iconHeight, false ) image:color ( part.r or 255, part.g or 255, part.b or 255 ) image:rotation ( part.rot or 0, part.rotOffX or 0, part.rotOffY or 0 ) width = width + part.width table.insert ( contentMessages[line], image ) end elseif part[1] == "color" or part[1] == "colour" then r = part.r or r g = part.g or g b = part.b or b elseif part[1] == "padding" then width = width + part.width or 0 end contentMessages[line].scale = scale end --Now reposition everything properly if align == "center" or align == "centre" then x = x - width/2 elseif align == "right" then x = x - width end for i,widget in ipairs(contentMessages[line]) do local wx,wy = getWidgetPosition ( widget ) setWidgetPosition ( widget, x + wx, wy ) end return true end function fadeLine ( line ) setLineAlpha ( line, 1 ) fadingLines[line] = getTickCount() end ----- addEventHandler ( "onClientRender",getRootElement(), function() for line,originalTick in pairs(fadingLines) do local tickDifference = getTickCount() - originalTick if tickDifference > endTime then destroyLine ( line ) setLineAlpha ( line, 1 ) fadingLines[line] = nil elseif tickDifference > config.startFade then local fadeTimeDifference = tickDifference - config.startFade --calculate the alpha local newAlpha = 1 - fadeTimeDifference/config.fadeTime --Set all the alphas setLineAlpha ( line, newAlpha ) end end end ) function setLineAlpha ( line, alpha ) for i,part in ipairs(contentMessages[line]) do setWidgetAlpha ( part, alpha ) end end function destroyLine ( line ) for k,part in ipairs(contentMessages[line]) do destroyWidget(part) end contentMessages[line] = {} end function destroyWidget ( widget ) if isElement(widget) then destroyElement ( widget ) elseif type(widget) == "table" and widget.destroy then widget:destroy() end end function getWidgetPosition ( widget ) if isElement(widget) then return guiGetPosition ( widget, false ) elseif type(widget) == "table" and widget.position then return widget:position() end end function setWidgetPosition ( widget, x, y ) if isElement(widget) then return guiSetPosition ( widget, x, y, false ) elseif type(widget) == "table" and widget.position then return widget:position(x,y,false) end end function setWidgetAlpha ( widget, alpha ) if isElement(widget) then guiSetAlpha ( widget, alpha ) elseif type(widget) == "table" and widget.color then local r,g,b = widget:color() widget:color(r,g,b,alpha*255) end end THANKS!
  23. Hello I'd like to make a script like this: Players to register Login Panel, could only have 1 account per serial. Can you help me? Thank you.
  24. Dinossauro

    HELP-ME!

    I made a script that works well. When any manager (only administrators can use the same) writes / dm, enters a different dimension and a message appears: Did another dimension, and make / sairdm to return to the current size and appears: You left dimension. function ( getElementDimension ( source ) == 0 ) setElementDimension ( source, 1 ) setElementDimension ( source, 1 ) outputChatBox( Você entrou na Dimensão ); end end addCommandHandler ( "dm", ElementDimension ) function ( getElementDimension ( source ) == 0 ) setElementDimension ( source, 0 ) setElementDimension ( source, 0 ) outputChatBox( Você saiu da Dimensão ); end end addCommandHandler ( "sairdm", ElementDimension ) But it is giving error. Help me, please!
×
×
  • Create New...