-
Posts
1,102 -
Joined
Everything posted by Enargy,
-
createObject createColSphere createExplosion onColShapeHit --- when players touch Sphere
-
I did not understood, Ryancit2 code correctly work. what do you want to do exactly?
-
I made this script 2 years ago for practice scripting. it might be usefully for you: addEventHandler("onClientRender", root, function() local playerName local team = getPlayerTeam(localPlayer) local name = getPlayerName(localPlayer) if team then local tname = getTeamName(team) local r,g,b = getTeamColor(team);colorCode = RGBToHex(r,g,b) playerName = colorCode.."["..tname.."]#FF3300"..name else playerName = name end dxDrawText(playerName, 350, 558, 723, 635, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, true, false) end ) --- [[ USEFUL by NeonBlack ]] --- function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end
-
Tal vez no se guardan al salir del juego.
-
You never canceled the event. addEventHandler("onPlayerChat", root, function() local account = getPlayerAccount( source ); if ( isGuestAccount(account) ) then outputChatBox("Login to your account to use chat", source); cancelEvent ( ); end end ); I forgot cancelEvent , thanks
-
addEventHandler("onPlayerChat", root, function() local account = getPlayerAccount( source ); if ( not isGuestAccount(account) ) then return else outputChatBox("Login to your account to use chat", source); end end );
-
https://wiki.multitheftauto.com/wiki/Sl ... getBotTeam
-
Es exactamente lo que necesitaba, gracias
-
Por ejemplo si tengo esto el numero 38 en un string. "38" y ese numero lo quiero sacar del string para que quede sin las comillas.
-
Hola, es posible hacer que en una escritura se le pueda agregar una string? eg texto = HOLA texto = "HOLA" o en el caso de algún numero, que se pueda sacar de un string local numeroinicial= 0 local numerostr = "38" resultado = numeroinicial+numerostr --- Aquí el numero que está en 'numerostr' pero sin las comillas " "
-
getPlayerAccount/getAccountName setElementData/getElementData Luego en un texto o algo asi colocas en el string el dato del elemento (en el cliente obviamente pero tambien se puede hacer desde serverside)
-
El código esta bien pero lo único que olvidaste fue el evento para que el panel es creado, por eso es que en el debug te aparece que el elemento no es existente. agrega esto en tu código: addEventHandler("onClientResourceStart", resourceRoot, NOMBRE_DE_LA_FUNCION)
-
Que nombre tan creativo tiene tu servidor . Suerte con tu servidor, se ve que tiene cosas curiosas
-
I've never played in DayZ anyway. Nice admin panel
-
you wrote wrong on finishing the function -- server 2 end addEventHandler(...) end it is end end addEventHandler(...) EDIT I don't know if i understood but are you trying to do something like this? function joinHandler1(_, currentAccount) local accountName = getAccountName(currentAccount) if accountName == "maky55" then spawnPlayer(source, posX1, posY1, posZ1) fadeCamera(source, true) setCameraTarget(source, source) elseif accountName == "terminator" then spawnPlayer(source, posX2, posY2, posZ2) fadeCamera(source, true) setCameraTarget(source, source) else spawnPlayer(X_POSITION, Y_POSITION, Z_POSITION) -- Your coordinates where the player gets spawned fadeCamera(source, true) setCameraTarget(source, source) end end addEventHandler("onPlayerLogin", getRootElement(), joinHandler1)
-
1. guiGetText triggerServerEvent onClientGUIClick -- evento -- createVehicle warpPedIntoVehicle 2. guiGridListGetSelectedItem(TU_GRIDLIST) guiCreateWindow --- o sino guiSetVisible, pero tendrías que crear la ventana cuando el recurso se inicia. outputChatBox
-
try local x, y, z = getElementPosition(localPlayer) instead of local x, y, z = getElementPosition(vehicle)
-
Dimos7 and raysmta never defined the element that executes the code. they put player in the function arguments. you have to make a loop thePlayer = getElementsByType( "player" ) for key, value in ipairs( thePlayer ) do -- your code end
-
It's unnecessary to get player health. Code function respawn() for _, player in ipairs(getElementsByType("player")) do local team = getPlayerTeam(player) if team then if (getTeamName(team) == "Assasin") then spawnPlayer(player, 0, 0, 5, 0, math.random(0, 288), 0, 0, spawnTeam) giveWeapon(player, 8, 1) giveWeapon(player, 1, 1) elseif (getTeamName(team) == "Gunner") then spawnPlayer(player, 0, 0, 5, 0, math.random(0, 288), 0 , 0, spawnTeam) end end end end addEventHandler("onResourceStart", resourceRoot, respawn) addEventHandler("onPlayerSpawn", root, function() local team = getPlayerTeam(source) if team then if (getTeamName(team) == "Assasin") or (getTeamName(team) == "Gunner") then outputChatBox("Bạn đã được respawn", source, 255, 0, 0) end end end)