Renkon
Members-
Posts
876 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Renkon
-
hay otro: outputChatBox ("Testing 2", playerCriminals, 0, 255, 0) Pero a ver, ahi te digo
-
Que outputChatBox hace eso, exactamente? el de sendMensage o el otro
-
You are triggering the event from client to server, but you haven't added any ARGUMENT, so p is null. hWnd_Commands = guiCreateWindow( 0.2, 0.2, 0.6, 0.6, "Admin LVL.5 Commands || By Enjoy || Version 1.0", true ) hGrid_Admin = guiCreateGridList( 0.1, 0.1, 0.8, 0.6, true, hWnd_Commands ) function visibleToAdmin5() triggerServerEvent('aclAdmin5', root, source) guiSetVisible(hWnd_Commands, true) showCursor(true) end addCommandHandler('mycmds', visibleToAdmin5) addEventHandler('onPlayerLogin', getRootElement(), visibleToAdmin5)
-
Check what does getVersion return
-
Al poner LOCAL, te va a tirar error porque no hay definicion de marker1. Sacale el LOCAL
-
function starthud() addEventHandler("onClientRender", root, DXdraw) end addEventHandler("onClientResourceStart",root,starthud) function checkmap() if isPlayerMapVisible() then removeEventHandler("onClientRender", root, DXdraw) end end addEventHandler("onClientRender",root, checkmap)
-
Check onPlayerChat radius example. local nearbyPlayers = {} addEventHandler( 'onPlayerVoiceStart', root, function() local r = 20 -- We get users' position local posX, posY, posZ = getElementPosition( source ) -- create a sphere of the specified radius in that position local chatSphere = createColSphere( posX, posY, posZ, chatRadius ) -- get a table all player elements inside it nearbyPlayers = getElementsWithinColShape( chatSphere, "player" ) -- and destroy the sphere, since we're done with it destroyElement( chatSphere ) -- We create a ColSphere -- We get next Empty channel local empty = exports.voice:getNextEmptyChannel ( ) exports.voice:setPlayerChannel(source, empty) -- We have playerList. Now what? Simple, we set them in a empty channel but first we egt current channel for index, player in ipairs (nearbyPlayers) do -- Supposing they are in the main channel (this wont work if they aren't. or bah, wont' work correctly ;D exports.voice:setPlayerChannel(player, empty) end end) -- So after that... addEventHandler("onPlayerVoiceStop",root, function() -- We set those playas back :3 exports.voice:setPlayerChannel(source) for index, player in ipairs (nearbyPlayers) do -- Going to lobby exports.voice:setPlayerChannel(player) end -- We clear the table nearbyPlayers = {} end) UNTESTED
-
If you release it, tell me what's left and MAYBE I can try to finish it and release it. I have been thinking about creating a Script Editor in C# already but I hadn't had any imagination or creativity for it
-
function team(player) for i,v in ipairs(getElementsByType("faction")) do local f = getElementData(v, "name") if (f == getElementData(v, "name")) then setPlayerTeam(player, getElementData(v, "name")) end end addEventHandler("onPlayerLogin",getRootElement(),team) addEventHandler("onResourceStart",getRootElement(),team) addEventHandler("onFactionInvite",getRootElement(),team)
-
try this: --Markers-- LVMarker = createMarker ( -47.673049926758, -62.346290588379, -10.607986450195, "cylinder", 1.5, 255, 0, 0, 170 ) SFMarker = createMarker ( -47.673049926758, -67.268165588379, -10.607986450195, "cylinder", 1.5, 0, 255, 0, 170 ) LSMarker = createMarker ( -47.673049926758, -71.514259338379, -10.607986450195, "cylinder", 1.5, 0, 0, 255, 170 ) --handles the joining of countries-- function LVSpawn ( sourcePlayer ) --source is the marker if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup("LVCiv") then aclGroupAddObject( aclGetGroup("LVCiv"), "user."..getAccountName(getPlayerAccount(sourcePlayer)) ) end spawnPlayer ( sourcePlayer, 1685.8544921875, 993.6201171875, 10.8203125) end addEventHandler( "onMarkerHit", LVMarker, LVSpawn ) function SFSpawn ( sourcePlayer ) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup("SFCiv") then aclGroupAddObject ( aclGetGroup("SFCiv"), "user."..getAccountName(getPlayerAccount(sourcePlayer)) ) end spawnPlayer ( sourcePlayer, -2624.373046875, 1412.80078125, 7.09375 ) end addEventHandler( "onMarkerHit", SFMarker, SFSpawn ) function LSSpawn ( sourcePlayer ) if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup("LSCiv") then aclGroupAddObject ( aclGetGroup("LSCiv"), "user."..getAccountName(getPlayerAccount(sourcePlayer)) ) end spawnPlayer ( sourcePlayer, 1727.70703125, -1118.552734375, 24.085935592651) end addEventHandler( "onMarkerHit", LSMarker, LSSpawn ) -- Checks if the player is in one of the ACL Groups and if not spawns him in a place to choose addEventHandler("onPlayerLogin", root, function(_,curAcc) if isObjectInACLGroup ("user."..getAccountName(curAcc), aclGetGroup ( "SFCiv" ) ) then spawnPlayer ( source, -2624.373046875, 1412.80078125, 7.09375 ) elseif isObjectInACLGroup ("user."..getAccountName(curAcc), aclGetGroup ( "LVCiv" ) ) then spawnPlayer ( source, 1685.8544921875, 993.6201171875, 10.8203125) elseif isObjectInACLGroup ("user."..getAccountName(curAcc), aclGetGroup ( "LSCiv" ) ) then spawnPlayer ( source, 1727.70703125, -1118.552734375, 24.085935592651) else spawnPlayer ( source, -81.016799926758, -81.045509338379, -10.607986450195 ) end end )
-
local f = " .. getElementData(v, "name") .." Tercero estas poniendo las funciones como string, local f = getElementData(v,"name")
-
Exacto... algo así pero no estoy MUY serguro ni recuerdo donde iba
-
Maybe you have a resource that shuts down the server?
-
setElementData(source, "Rank", ":scriptname/"..getAccountData(account, "Rank")..".png") y en el client de Scoreboard debes editar unas lineas, if column.name == "tal nombre" then creas la imagen
-
No recuerdo bien, pero hay una linea donde muestra que si la cantidad de vivos es igual a 1, se ejecute el voto. Tendrias que modificar ese '1' por un '0'
-
function inicio () local hours = getTime() if ( hours >= 23 ) then startResource( getResourceFromName( 'slothbot' ) ) end end addEventHandler("onResourceStart",getRootElement(), inicio) -----top--- function alto () if ( hours >= 03 ) then restartResource( getResourceFromName( 'slothbot' ) ) end end addEventHandler("onResourceStart", getRootElement(),alto) Muchos errores. Solo te nombraré dos para que vayas arreglando. Primero, en la segunda función te tendria que dar error porque la variable HOURS no esta declarada. Y segundo, la funcion getTime retorna dos valores. Por recomendación, te conviene agregar un parámetro (variable) más, aunque no lo uses.
-
Borra las lineas 22, 162, 163, 164, y luego borra de la 172 a la 193
-
Puedes crearlas onClientResourceStart y cambiarles el alpha para mostrarlas. Y no estoy seguro pero quizás destroyElement funcione. No estoy seguro
-
local hours, faps = getTime() if ( hours >= 23 ) then
-
Serverside where's playerSource defined btw? and triggeringServerEvent I'd rather use localPLAYER than GetRootElement.
