Jump to content

yanvr

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by yanvr

  1. yanvr

    call resource

    I'm trying this and not works addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == Mn1 ) then call ( getResourceFromName ( 'login' ), 'guiSetVisible(LoginWin, true)' ); end end ) This is the login resource. when the login resource start the login gui is invisible. I want to setvisible the login gui with a button. login client: x,y = guiGetScreenSize() LoginWin = guiCreateWindow(x/2 - 150,y/2 - 110,300,220,"[Crows] Login",false) TabPanel = guiCreateTabPanel(17,30,261,152,false,LoginWin) TabLogin = guiCreateTab("Entrar",TabPanel) LblUsername = guiCreateLabel(11,27,70,16,"Usuario",false,TabLogin) LoginUsername = guiCreateEdit(76,26,171,21,"",false,TabLogin) LblPassword = guiCreateLabel(11,60,70,16,"Contraseña",false,TabLogin) LoginPassword = guiCreateEdit(76,58,171,21,"",false,TabLogin) guiEditSetMasked(LoginPassword,true) TabRegister = guiCreateTab("Registrarse",TabPanel) LblRegisterUsername = guiCreateLabel(11,27,70,16,"Usuario",false,TabRegister) EditRegisterUsername = guiCreateEdit(76,26,171,21,"",false,TabRegister) LblRegisterPassword = guiCreateLabel(11,60,70,16,"Contraseña",false,TabRegister) EditRegisterPassword = guiCreateEdit(76,58,171,21,"",false,TabRegister) guiEditSetMasked(EditRegisterPassword,true) LblRegisterEmail = guiCreateLabel(35,92,35,16,"¿Sexo?",false,TabRegister) EditRegisterEmail = guiCreateEdit(76,90,171,21,"",false,TabRegister) BtnAction = guiCreateButton(182,188,95,19,"Jugar!",false,LoginWin) guiSetVisible(LoginWin, false) local localPlayer = getLocalPlayer() function receiveVars( allow, email) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") if (email == "false") then guiSetVisible(LblRegisterEmail, false) guiSetVisible(EditRegisterEmail, false) end if (allow == "false") then guiDeleteTab(TabRegister, TabPanel) end guiSetSelectedTab(TabPanel, TabLogin) guiSetText(LoginUsername, playername) guiSetText(EditRegisterUsername, playername) guiSetVisible(LoginWin, true) guiBringToFront(LoginWin) guiSetInputEnabled(true) showCursor(true) end addEvent( "onSendVars", true ) addEventHandler( "onSendVars", getRootElement(), receiveVars ) function windowHandler() triggerServerEvent("onNeedVars", getLocalPlayer()) end function onClickBtn(button, state) if(button == "left" and state == "up") then if(source == BtnAction) then if(guiGetSelectedTab(TabPanel) == TabLogin) then triggerServerEvent("on4XLogin", getRootElement(), localPlayer, guiGetText(LoginUsername), guiGetText(LoginPassword)) else triggerServerEvent("on4XRegister", getRootElement(), localPlayer, guiGetText(EditRegisterUsername), guiGetText(EditRegisterPassword), guiGetText(EditRegisterEmail)) end end end end addEventHandler("onClientGUIClick", BtnAction, onClickBtn, false) function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(LoginWin, false) showCursor(false) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) serverside: function on4XLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if ( not isGuestAccount ( account ) ) then -- For every player that's logged in.... logOut ( player ) -- Log them out. end if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "ERROR!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Contraseña o usuario Incorrecto/a!", player, 255, 255, 0 ) -- Output they got the details wrong. end end addEvent( "on4XLogin", true ) addEventHandler( "on4XLogin", getRootElement(), on4XLogin ) function on4XRegister ( player, user, pass, email ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) setAccountData ( account, "email", email) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Error de registro/entrada!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "on4XRegister", true ) addEventHandler( "on4XRegister", getRootElement(), on4XRegister ) function needVars() local allow_register = get("allow_register") local email_on_register = get("email_on_register") triggerClientEvent(source, "onSendVars", getRootElement(), allow_register, email_on_register) end addEvent("onNeedVars", true) addEventHandler("onNeedVars", getRootElement(), needVars)
  2. yanvr

    call resource

    hi I'm doing this test gametype but I need to explain me how to make start another panel from other resource with a button still do not understand some things (enough) I try this but does not work fadeCamera(true, 6, 0, 0, 0) setCameraMatrix(-1545.4565429688,1018.2725830078,25.7421875, -1545.9423828125, 1014.6403198242, 26.99153137207) setCameraMatrix(2032.2386474609,1317.4577636719,10.8203125, 2032.2386474609, 1316.4416503906, 10.8203125) Menu = guiCreateWindow(100, 300, 300, 200, "Welcome", false ) Mn1 = guiCreateButton(25,20,250,30,"Enter",false,Menu) Mn2 = guiCreateButton(25,55,250,30,"Options",false,Menu) Mn3 = guiCreateButton(25,85,250,30,"Los Santos",false,Menu) Mn4 = guiCreateButton(25,120,250,30,"San fernando",false,Menu) Mn5 = guiCreateButton(25,150,250,30,"Help",false,Menu) showCursor(true) addEventHandler("onClientResourceStart",getRootElement(),setUp) addEventHandler ("onClientGUIClick", Mn1, call (getResourceFromName("login"),windowHandler) end the button is "Mn1 = "Enter" the login resource is "login_register ([crows]login)" https://community.multitheftauto.com/ind ... ls&id=3473
  3. utf is only binary? i want to encode client-side like this: setTimer ˆó@ ð? You Dont Have $ To Buy Speed ! Speed !! Speed is Disabled sBelts price.sbelt sBelEL sbeltEL asB You Bought Suicide Belt By & You Will Be Exploded After 10 Seconds sw sh guiGetScreenSize countBelt @ sbelttext addEventHandler onClientRender @@ &@ $ To Buy Suicide Belt ! You Already Have Suicide Belt! Suicide Belt is Disabled bBlibs price.blib blibEL blibELM You Bought Players Icons By * You Will Have Players Icons For 1 Minutes aBlip Blip $ to Buy Players Icon! " You Already Have Players Icons !! Players Icons is Disabled bLasers price.laser aLaser triggerEvent laaser SetLaserEnabled bindKey l up ToggleLaserEnabled $ To Buy Laser ! Laser is Disabled eMine wHacks price.whack whELM You Bought Wall Hack By ”@ @ i@ table ps checkTarget lvl1bones K@ €J@ J@ €I@ F@ €E@ E@ €D@ @ @ :@ 9@ 8@ 7@ 6@ 5@ B@ €A@ A@ €@@ @@ ?@ @ @
  4. how encode the client-side resources?
  5. yanvr

    bindKey

    GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(227,186,309,254,"test",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(0.0291,0.1063,0.9385,0.8583,true,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Information",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(0.0724,0.1031,0.5138,0.1443,"stats:",true,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(0.069,0.3299,0.4448,0.2268,"skill:",true,GUIEditor_Tab[1]) GUIEditor_Label[3] = guiCreateLabel(0.0724,0.5361,0.331,0.2216,"rank:",true,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("vehicles",GUIEditor_TabPanel[1]) GUIEditor_Grid[1] = guiCreateGridList(0.0138,0.0309,0.4655,0.9381,true,GUIEditor_Tab[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) GUIEditor_Button[1] = guiCreateButton(0.5241,0.1082,0.4241,0.1959,"spawn",true,GUIEditor_Tab[2]) GUIEditor_Button[2] = guiCreateButton(0.5207,0.3557,0.431,0.1907,"buy",true,GUIEditor_Tab[2]) GUIEditor_Button[3] = guiCreateButton(0.5241,0.6237,0.431,0.1856,"sell",true,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) bindKey("o", "down", function () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[2] ) ) end ) In this time it works But the panel appears when you connect I want to see panel when you press the button
  6. yanvr

    bindKey

    hi i have problem with this bind: bindKey("o", "down", function () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[2] ) ) end ) The gui is not open. It's my first time using guieditor. someone could help me? try commenting on the previous post but it was closed I did not want to steal resources just download community resources and modify for my server I did not know could not do that just think I'm a newbie and I'm lua learning little by little and now I can only modify community resources and ask for help from the people in this place. really sorry I did not want to be angry or think you tried to steal sorry x shadow and sorry again for my clumsy English
  7. where to download qt to lua editor? the link dont works
  8. yanvr

    dxscoreboard

    hello I need to teach me a little with the dxscoreboards i'm working with a experience system labels and i want to add some columns in the DXSCOREBOARD: experience and level. The problem is that the exp resource works when player when a player dies. I can't work with zombies. Can anybody help? Serverside Clientside
  9. yanvr

    outputChatBox

    IT WORKS THANKS SO MUCH!
  10. yanvr

    outputChatBox

    hello i have created a script whit a marker colour.. when a player enters the hidden marker wins. that's OK. Now need help: I can only create this in the outputChatBox: =the new winner $60000= How to add a playernick winner in the chatbox text? example: =YANVAR is the new winner $60000= the codes: local message = "#FFFF00is the new winner $60000" local outPutMsg = outputChatBox(message, getRootElement(), red, green, blue, useHTMLcolors) can anyone help me please? sorry for my bad english
  11. Yes he did me a disservice and thank solid for the help again! But i like to learn, and i dedicate to find what was the difference in your script and the real.
  12. Hello i have a problem whit that resource: https://community.multitheftauto.com/ind ... ls&id=3554 Look: if u click in any part of the principal window this will close and buy all the weapons and bullets Can anybody help me with that bug?
  13. yanvr

    chat colour

    It works! thanks for help men
  14. yanvr

    chat colour

    Hello i want know how to make the chat red colour
  15. yanvr

    car sound

    you say that I can add real sounds over the real, like a weapon sound pack resource? Can u tell me where to start? I will try make a resource with that style
  16. yanvr

    car sound

    Hello i have a question. Can i change or replace new vehicle sounds?
  17. Thanx for all solid, the zombie spawn but the extrahealth don't has effect. I tired I surrender
  18. At this time i try crate a zombieboss looking another posts. I have a problem with the boss it isn't appear That is the script: function crearBoss (thePlayer) BOSS = createZombie ( 1086.6645507813, 1076.1888427734, 10.838157653809, 90, 13, 0, 0 ) exports.extrahealth:setElementExtraHealth(BOSS,100000) end addEventHandler ( "onResourceStart", resourceRoot, createZombie )
  19. Yes now work!! Thanks for your time and help.
  20. I want to re edit the lower and the top bar in the image
  21. Hello i want change color or delete these bars but i don't know what is the function name can somebody teachme please
  22. yanvr

    extrahealth

    Ooo man helpme please we are trying to much things to set bot superlife.But dont works I tried creating boss whit zombies but don't knowww I view bots in servers whit extrahealth. How? please tellme how can create a bossss
  23. yanvr

    extrahealth

    Really i don't know the resource has been reedited by me and my neighbor it's my friend.
  24. yanvr

    extrahealth

    Yes extrahealth resource is running when the bot is start
×
×
  • Create New...