-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
WARNING: MFLoginPanel\script.lua:46: Bad argument @ 'logIn' [Expected account at argument 2, got string] WARNING: MFLoginPanel\script.lua:46: Bad argument @ 'logIn' [Expected account at argument 2, got boolean]
-
function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else addAccount (username, password) if (logIn(player, account, password) == true) then triggerClientEvent(player, "hideLoginWindow", getRootElement()) showChat( source, true) setTimer ( fadeCamera, 50, 1, source,false, 1 ) exports["Evo-notificaciones"]:showBox ( source, "warning", "Bienvenido Al Server Su No Apareses Reconnecta /reconnect Y Si Apareses En Un Edificio Tirate Y Lee F1 Esperamos Que Tengas Una Buena Convivencia Con El Server." ) setTimer ( fadeCamera, 1000, 1, source,true, 3 ) setTimer( spawnPlayer, 1600,1,source, 1682.6030273438, -2327.3889160156, 13.546875) setTimer(setCameraMatrix,1500,1,source, 808,-1351,-0.4,-1000,0,0,0,0) setTimer(setElementRotation,2251,1,source,0,0,220) end end end Hi all! I have a problem on Console with this script. WARNING: MFLoginPanel\script.lua:46: Bad argument @ 'logIn' [Expected account at argument 2, got boolean] Please, Can any person help me?
-
Hola a todos. Quisiera preguntar que evento o que funcion deberia usar para mostrarle algo a un player que logea por primera vez? Desde ya, muchas gracias.
-
Buen script como para comenzar +1
-
Despues lo pruebo porque ahora no puedo. Muchas gracias igual Solid. OFF-Topic: Muy buen feliz cumpleaños Solid. Espero que la hayas pasado bien este dia
-
function adminchat(thePlayer, ...) local word = {...} local message = table.concat(word, " ") local account = getPlayerAccount ( thePlayer ) for _, group in ipairs ( { "Admin", "Moderator", "SuperModerator" } ) do if isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup (group) ) then outputChatBox ( "#FF0000[Admin Chat]" .. getPlayerName ( thePlayer ) .. ": " .. message, getRootElement(), 255, 255, 255, true ) else exports["Evo-notificaciones"]:showBox ( thePlayer, "error", " "..getPlayerName(thePlayer).."Acceso Denegado.") end end end addCommandHandler("ga", adminchat) Hola. Bueno el error con mi script es que el admin chat se los muestra a los players y yo quiero que solo lo vean los admins. El color hex se muestra como esta y el else no funciona porque tambien se los manda a los admins. Me pueden ayudar?
-
It works. Thank you very much Solid.
-
-------------------------------------------------------------------------------------------- -- Scripting by Sasuke -- Client-Side -------------------------------------------------------------------------------------------- addEvent("admin", true) addEventHandler("admin", getRootElement(), function() addEventHandler("onClientRender", getRootElement(), logueoadmin) setTimer( function() removeEventHandler("onClientRender", getRootElement(), logueoadmin) end,7000,1) end) function logueoadmin() dxDrawRectangle(417, 648, 500, 30, tocolor(0, 0, 0, 0), true) dxDrawText( getPlayerName(localPlayer).." (Admin |Lv4|) Ha iniciado Sesion!", 422, 649, 845, 668, tocolor(255, 255, 255, 255), 1, "pricedown", "left", "top", false, false, true, false, false) end -------------------------------------------------------------------------------------------- -- Scripting by Sasuke -- Server-Side -------------------------------------------------------------------------------------------- addEventHandler("onPlayerLogin", getRootElement(), function() local account = getPlayerAccount(source) if isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( getRootElement(), "admin", getRootElement() ) end end )
-
I am trying to do a script when an admin loggin appear dxDrawText for all players with admin's name.
-
Sorry... I made the command just for testing and then forgot to change it back before posting. No problem.Thanks you very much. But I have a problem. Only the admin can see dxDrawText Any solution?
-
Perfect Samer! It works. Thank all for try.
-
Sorry, but I dont want to use a command to appear dx. But thank you for try.
-
WARNING: Bad argument @ 'removeEventHandler'[Expected function at argument 3, got nil]
-
Thank you for try but It has an error on debugscript: WARNING: Bad argument @ 'removeEventHandler' [Expected string at argument 1, got root]
-
Thank you for try but It has an error on debugscript: WARNING: Bad argument @ 'removeEventHandler' [Expected string at argument 1, got root]
-
Thanks you for try but I forgot to say that I need dx appear for 7 seconds. Sorry for my english.
-
-------------------------------------------------------------------------------------------- -- Scripting by Sasuke -- Server-Side -------------------------------------------------------------------------------------------- addEventHandler("onPlayerLogin", getRootElement(), function (p) for i,v in pairs(getElementsByType("player")) do local account = getPlayerAccount ( v ) if isObjectInACLGroup ( "user." .. getAccountName(account), aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "admin",getRootElement() ) end end end ) -------------------------------------------------------------------------------------------- -- Scripting by Sasuke -- Client-Side -------------------------------------------------------------------------------------------- addEventHandler("onClientResourceStart", resourceRoot, function() end ) function logueoadmin( thePlayer ) dxDrawRectangle(417, 648, 461, 30, tocolor(5, 0, 5, 141), true) dxDrawText( getPlayerName( thePlayer ).." (Admin |Lv4|) Ha iniciado sesion", 422, 649, 845, 668, tocolor(200, 0, 0, 141), 1, "pricedown", "left", "top", false, false, true, false, false) end addEvent("admin", true) addEventHandler("admin", getRootElement(), logueoadmin) setTimer ( logueoadmin, 7000, 1 ) I have errors on debugscript 3: WARNING: logueo\admin_C.lua:9: Bad argument @ 'getPlayerName'[Expected player at argument 1, got nil] ERROR: logueo\admn_C.lua:9: attempt to concatenate a boolean value Thank you very much. Sorry for post. I learning scripter. Client side is dificult for me
-
Hi all! I have a problem with exports. function createTeamsOnStart () teamswat = createTeam ( "SWAT", 30, 0, 255 ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function iraswat ( gangName, player, command ) local gang = exports [ "gang_system" ]:getPlayersByGang ( gangName ) if ( gang == "SWAT" ) then setPlayerTeam ( player, teamswat ) setPlayerSkin(player, 285) giveWeapon ( player, 3 ) local allowedGroups = {"SWAT"} setElementData( player, "Occupation", "SWAT", true ) exports["Evo-notificaciones"]:showBox ( player, "info"," "..getPlayerName(player).." Bienvenido Ala SWAT." ) end end addCommandHandler ( "swat", iraswat ) I am using gang_system by @Solidsnake14 but when I put /swat command Its doesnt work. Can you help me? Thanks very much.
-
Thank you very very much Castro.
-
Hello! I need help with my script. Server-side: function suicidar() setTimer( function(sourcePlayer) killPed(sourcePlayer) end , 10000, 1 ) end addEvent( "onPlayerSuicidio", true ) addEventHandler( "onPlayerSuicidio", getRootElement(), suicidar ) Client-side: addEventHandler("onClientResourceStart", resourceRoot, function() end ) addCommandHandler( "kill", function() addEventHandler("onClientRender", getLocalPlayer(), function() dxDrawRectangle(413, 571, 517, 30, tocolor(0, 0, 0, 145), true) dxDrawText("Espera 10 segundos y moriras.", 416, 571, 859, 593, tocolor(255, 0, 0, 255), 1, "bankgothic", "left", "top", false, false, true, false, false) triggerServerEvent ( "onPlayerSuicidio", getLocalPlayer() ) end ) end ) I have any error on debugscript 3. I need that when a player type /kill command, appear dxDrawText and dissapear in 10 seconds. Thank you very much.