-
Posts
1,708 -
Joined
-
Last visited
Everything posted by iFoReX
-
please help me I dont know what are bad :c addEventHandler('onClientPlayerJoin', root, function() dxDrawText("'* ' .. getPlayerName(source) .. ' a entrado al server",504.0,4.0,574.0,20.0,tocolor(200,0,0,255),0.7,"sans","left","top",false,false,false) end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) outputChatBox('* ' .. oldNick .. ' is now known as ' .. newNick, 255, 100, 100) end ) addEventHandler('onClientPlayerQuit', root, function(reason) dxDrawText("'* ' .. getPlayerName(source) .. ' a salido del server [' .. reason .. ']'",503.0,16.0,573.0,32.0,tocolor(0,0,255,170),0.7,"sans","left","top",false,false,false) end )
-
dragonslife a tip, use GuieDitor I use this and view my Guis = is exelent for news in this of GUI
-
I click in Button and Nothing :c
-
I want said , what functions or events I have uniting
-
what are bad ? I click the button and dont register Client-Side GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window[1] = guiCreateWindow(130,156,513,341,"GUI Login-Register By ElMota",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,38,495,294,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Login",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(12,46,21,21,"Nick",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],200, 0, 0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(42,42,158,23,"",false,GUIEditor_Tab[1]) guiEditSetMaxLength(GUIEditor_Edit[1],22) GUIEditor_Label[2] = guiCreateLabel(8,113,63,19,"Contrase?a",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[2],200 ,0 ,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(75,108,134,26,"",false,GUIEditor_Tab[1]) guiEditSetMasked(GUIEditor_Edit[2],true) guiEditSetMaxLength(GUIEditor_Edit[2],10) GUIEditor_Button[1] = guiCreateButton(17,182,190,54,"Loggearme",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Memo[1] = guiCreateMemo(260,25,222,108,"Favor Loggearse :\n\nPrivilegios de estar loggeado :\n\n- se te guardaran todos tus datos en mi sistema mySQL",false,GUIEditor_Tab[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Label[3] = guiCreateLabel(213,228,268,34,"GUI Creada por ElMota CopyRight 2011-2012 (c)",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],200,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(132,146,354,28,"Acepto los Terminos y Condiciones de este Servidor",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Checkbox[2] = guiCreateCheckBox(28,80,194,22,"Mostrar Contrase?a",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[2],"default-bold-small") GUIEditor_Tab[2] = guiCreateTab("Register",GUIEditor_TabPanel[1]) GUIEditor_Label[4] = guiCreateLabel(4,32,26,16,"Nick",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[4],200,0,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(35,23,176,30,"",false,GUIEditor_Tab[2]) guiEditSetMaxLength(GUIEditor_Edit[3],23) GUIEditor_Label[5] = guiCreateLabel(2,80,65,22,"Contrase?a",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[5],200,0,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Edit[4] = guiCreateEdit(73,74,140,31,"",false,GUIEditor_Tab[2]) guiEditSetMasked(GUIEditor_Edit[4],true) guiEditSetMaxLength(GUIEditor_Edit[4],10) GUIEditor_Label[6] = guiCreateLabel(3,128,40,16,"e-mail",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[6],200,0,0) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Edit[5] = guiCreateEdit(47,118,168,30,"",false,GUIEditor_Tab[2]) guiEditSetMaxLength(GUIEditor_Edit[5],20) GUIEditor_Button[2] = guiCreateButton(14,179,207,68,"Registrarme",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Button[2],"sa-header") GUIEditor_Memo[2] = guiCreateMemo(243,17,240,128,"Recuerda antes De loggearte debes estar registrado aqui osino no podras jugar ^^ GUI Creada por ElMota (c)",false,GUIEditor_Tab[2]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) GUIEditor_Checkbox[3] = guiCreateCheckBox(246,162,215,28,"Mostrar Contrase?a",false,false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Checkbox[3],"default-bold-small") GUIEditor_Checkbox[4] = guiCreateCheckBox(223,217,263,21,"Acepto los terminos y Condiciones de este server",false,false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Checkbox[4],"default-small") guiSetVisible(GUIEditor_Window[1], false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], clientSubmitLogin, false) showTheGUI() end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Checkbox[1] ) then guiEditSetMasked ( GUIEditor_Edit[2], guiCheckBoxGetSelected ( source ) ) end end ) function showTheGUI() outputChatBox("Bienvenido a mi Servidor de MTA porfavor Loggeate.") -- if the GUI was successfully created, then show the GUI to the player if (GUIEditor_Window[1] ~= nil) then guiSetVisible(GUIEditor_Window[1], true) else -- if the GUI hasnt been properly created, tell the player outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end function clientSubmitLogin ( button, state ) if ( button == "left" and state == "up" ) then local username = guiGetText(GUIEditor_Edit[1]) local password = guiGetText(GUIEditor_Edit[2]) -- if the username and password both exist if ( username and password ) then triggerServerEvent("submitLogin", localPlayer, username, password) guiSetInputEnabled(false) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else outputChatBox("Porfavor pon tu Nick y tu Contrase?a.") end end end function clientSubmitaccount ( button, state ) if ( button == "left" and state == "up" ) then local username = guiGetText(GUIEditor_Edit[3]) local password = guiGetText(GUIEditor_Edit[4]) -- if the username and password both exist if ( username and password ) then triggerServerEvent("addAccount", localPlayer, username, password) guiSetInputEnabled(false) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else outputChatBox("Porfavor pon tu Nick y tu Contraseña.") end end end addEventHandler("onClientGUIClick", GUIEditor_Button[2], clientSubmitaccount, false) Server-Side -- create our loginHandler function, with username and password parameters (passed from the client GUI). function loginHandler(username,password) -- check that the username and password are correct. local acc = getAccount(username, password) -- the player has succesfully logged in, so spawn them. if (acc) then logIn ( source, acc, password ) spawnPlayer (source, 1959.55, -1714.46, 10) fadeCamera(source, true) setCameraTarget(source) outputChatBox("Enjoy your time!", source) else -- if the username or password are not correct, output a message to the player. outputChatBox("invalid username and password. Please re-connect and try again.", source) end end -- define our costom event, and allow it to be triggered from the client ('true'). addEvent("submitLogin",true) -- add an event handler so that when submitLogin is triggered, the function loginHandler is called. addEventHandler("submitLogin",root, loginHandler) local bRegisteredOnce = false function registerPlayer (username,password if(password ~= "" and password ~= nil and username ~= "" and username ~= nil and bRegisteredOnce == false) then local accountAdded = addAccount(username,password) if(accountAdded) then outputChatBox("Thank you " .. getPlayerName(source) .. ", Ya estas Registrado ahora loggeate",source) bRegisteredOnce = true else outputChatBox("Error creating account, contact the server admin.",source) end else if bRegisteredOnce == true then outputChatBox("You already registered on this server!",source) else outputChatBox("Porfavor Pon tus datos Correctos, source) end end end
-
solid what are the functions or events for a GUI register ?
-
I want know how I can Put all skins can kill to the fugitive , and how Create a Blip in radar ? Please help or help with the events or functions --KILL REWARD PER STAR kreward = 250 --WANTED LEVEL IF A PLAYER IS MURDERED BY A NON-COP, OR IF AN INNOCENT PERSON IS MURDERED BY A COP function aplayerdied( ammo, attacker, weapon, bodypart ) local glevel = getPlayerWantedLevel ( source ) if glevel > 0 then destroyBlipsAttachedTo(source) end if ( attacker ) then local wlevel = getPlayerWantedLevel( source ) if wlevel > 0 then local kskin = getPlayerSkin ( attacker ) if kskin == 71 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 then setPlayerWantedLevel( source, 0 ) local thisreward = wlevel*kreward givePlayerMoney ( attacker, thisreward ) return end end if ( getElementType( attacker ) == "player" ) then local wlevel = getPlayerWantedLevel( attacker ) if wlevel < 2 then setPlayerWantedLevel( attacker, wlevel+1 ) if wlevel == 1 then local wblip = createBlipAttachedTo( source, 56 ) end elseif wlevel == 6 then end elseif ( getElementType( attacker ) == "vehicle" ) then thekiller = getVehicleController( attacker ) if ( thekiller ) then local wlevel = getPlayerWantedLevel ( thekiller ) if wlevel < 2 then setPlayerWantedLevel( thekiller, wlevel+1 ) if wlevel == 1 then local wblip = createBlipAttachedTo( source, 56 ) end end end end end setPlayerWantedLevel( source, 0 ) end addEventHandler ( "onPlayerWasted", getRootElement(), aplayerdied ) --FUNCTION TO CLEAR BLIPS function destroyBlipsAttachedTo(player) if not isElement(player) then return false end local attached = getAttachedElements ( player ) for k,element in ipairs(attached) do if isElement ( element ) and getElementType ( element ) == "blip" then destroyElement ( element ) end end end --WANTED LEVEL IF A POLICE OFFICER IS ATTACKED function assaultinganofficer ( attacker, weapon, bodypart, loss ) local vskin = getPlayerSkin ( source ) if vskin == 71 or vskin == 163 or vskin == 164 or vskin == 246 or vskin == 280 or vskin == 281 or vskin == 282 or vskin == 283 or vskin == 284 or vskin == 285 or vskin == 286 or vskin == 288 then if ( attacker ) then if ( getElementType( attacker ) == "player" ) then local kskin = getPlayerSkin ( attacker ) if kskin == 71 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 then return end elseif ( getElementType( attacker ) == "vehicle" ) then thedriver = getVehicleController( attacker ) if ( thedriver ) then local kskin = getPlayerSkin ( thedriver ) if kskin == 71 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 then return end end end if (getElementData ( source, "justdamaged" ) ~= "yes") and (source ~= attacker) then setElementData ( source, "justdamaged", "yes" ) local damagereset = setTimer ( resethurt, 20000, 1, source ) if ( getElementType( attacker ) == "player" ) then local wlevel = getPlayerWantedLevel( attacker ) if wlevel < 1 then setPlayerWantedLevel( attacker, wlevel+1 ) if wlevel == 1 then local wblip = createBlipAttachedTo( source, 56 ) end end elseif ( getElementType( attacker ) == "vehicle" ) then local thekiller = getVehicleController( attacker ) if (thekiller) then local wlevel = getPlayerWantedLevel ( thekiller ) if wlevel < 1 then setPlayerWantedLevel( thekiller, wlevel+1 ) if wlevel == 1 then local wblip = createBlipAttachedTo( source, 56 ) end end end end end end end end addEventHandler ( "onPlayerDamage", getRootElement(), assaultinganofficer ) function resethurt(source) if (source) then setElementData ( source, "justdamaged", nil ) end end --WANTED LEVEL IF SOMEONE OTHER THAN A COP JACKS SOMEONE function carjackcheck(theVehicle, seat, jacker) if (jacker) then local kskin = getPlayerSkin ( jacker ) if kskin == 71 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 then return end local wlevel = getPlayerWantedLevel( jacker ) if wlevel < 2 then setPlayerWantedLevel( jacker, wlevel+1 ) if wlevel == 1 then local wblip = createBlipAttachedTo( jacker, 56 ) end end end end addEventHandler ( "onPlayerVehicleExit", getRootElement(), carjackcheck ) --WANTED LEVEL IF NON-COP TRIES TO USE A COP CAR function copcarcheck(theVehicle, seat, jacked) local kskin = getPlayerSkin ( source ) if kskin == 71 or kskin == 163 or kskin == 164 or kskin == 246 or kskin == 280 or kskin == 281 or kskin == 282 or kskin == 283 or kskin == 284 or kskin == 285 or kskin == 286 or kskin == 288 then return else local carid = getVehicleID( theVehicle ) if carid == 598 or carid == 596 or carid == 597 or carid == 427 then local wlevel = getPlayerWantedLevel( source ) if wlevel < 2 then setPlayerWantedLevel( source, wlevel+1 ) end end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), copcarcheck ) --STUFF TO MAKE BRIBE PICKUPS WORK function pickedUpWantedCheck ( player ) if isElement ( source ) and ( getElementType(source) == "pickup" ) then if getPickupType ( source ) == 3 then if (getElementData ( source, "model" ) == "1247" ) then local level = getPlayerWantedLevel(player) if ( level > 0 ) then setPlayerWantedLevel ( player, level-1 ) if ( level == 1 ) then destroyBlipsAttachedTo(player) end end end end end end addEventHandler ( "onPickupHit", getRootElement(), pickedUpWantedCheck )
-
mmm Ok man function loginPlayer () local account = getAccount ( username, password ) -- Return the account if ( account ~= false ) then -- If the account exists. logIn ( thePlayer, account, password ) -- Here is the 1. else outputChatBox ( "Contraseña incorrecta!", thePlayer, 255, 255, 0 ) -- Output they got the details wrong. end end addEventHandler("onClientGUIClick", GUIEditor_Button[1], loginPlayer, false) --- Here the 2. and this = what are bad ? my GUI dont appear : Client-Side addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(130,156,513,341,"GUI Login-Register By ElMota",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,38,495,294,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Login",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(12,46,21,21,"Nick",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],200, 0, 0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(42,42,158,23,"",false,GUIEditor_Tab[1]) guiEditSetMaxLength(GUIEditor_Edit[1],22) GUIEditor_Label[2] = guiCreateLabel(8,113,63,19,"Contraseña",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[2],200 ,0 ,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(75,108,134,26,"",false,GUIEditor_Tab[1]) guiEditSetMasked(GUIEditor_Edit[2],true) guiEditSetMaxLength(GUIEditor_Edit[2],10) GUIEditor_Button[1] = guiCreateButton(17,182,190,54,"Loggearme",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Memo[1] = guiCreateMemo(260,25,222,108,"Favor Loggearse :\n\nPrivilegios de estar loggeado :\n\n- se te guardaran todos tus datos en mi sistema mySQL",false,GUIEditor_Tab[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Label[3] = guiCreateLabel(213,228,268,34,"GUI Creada por ElMota CopyRight 2011-2012 (c)",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],200,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(132,146,354,28,"Acepto los Terminos y Condiciones de este Servidor",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Checkbox[2] = guiCreateCheckBox(28,80,194,22,"Mostrar Contraseña",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[2],"default-bold-small") GUIEditor_Tab[2] = guiCreateTab("Register",GUIEditor_TabPanel[1]) GUIEditor_Label[4] = guiCreateLabel(4,32,26,16,"Nick",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[4],200,0,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(35,23,176,30,"",false,GUIEditor_Tab[2]) guiEditSetMaxLength(GUIEditor_Edit[3],23) GUIEditor_Label[5] = guiCreateLabel(2,80,65,22,"Contraseña",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[5],200,0,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Edit[4] = guiCreateEdit(73,74,140,31,"",false,GUIEditor_Tab[2]) guiEditSetMasked(GUIEditor_Edit[4],true) guiEditSetMaxLength(GUIEditor_Edit[4],10) GUIEditor_Label[6] = guiCreateLabel(3,128,40,16,"e-mail",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[6],200,0,0) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Edit[5] = guiCreateEdit(47,118,168,30,"",false,GUIEditor_Tab[2]) guiEditSetMaxLength(GUIEditor_Edit[5],20) GUIEditor_Button[2] = guiCreateButton(14,179,207,68,"Registrarme",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Button[2],"sa-header") GUIEditor_Memo[2] = guiCreateMemo(243,17,240,128,"Recuerda antes De loggearte debes estar registrado aqui osino no podras jugar ^^ GUI Creada por ElMota (c)",false,GUIEditor_Tab[2]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) GUIEditor_Checkbox[3] = guiCreateCheckBox(246,162,215,28,"Mostrar Contraseña",false,false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Checkbox[3],"default-bold-small") GUIEditor_Checkbox[4] = guiCreateCheckBox(223,217,263,21,"Acepto los terminos y Condiciones de este server",false,false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Checkbox[4],"default-small") guiSetVisible(GUIEditor_Window[1], false) addEventHandler("onClientGUIClick", GUIEditor_Button[1], clientSubmitLogin, false) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Checkbox[1] ) then guiEditSetMasked ( GUIEditor_Edit[2], true ), guiCheckBoxGetSelected ( source ) ) end end showTheGUI() end ) function showTheGUI() outputChatBox("Bienvenido a mi Servidor de MTA porfavor Loggeate.") -- if the GUI was successfully created, then show the GUI to the player if (GUIEditor_Window[1] ~= nil) then guiSetVisible(GUIEditor_Window[1], true) else -- if the GUI hasnt been properly created, tell the player outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end function clientSubmitLogin ( button, state ) if ( button == "left" and state == "up" ) then local username = guiGetText(GUIEditor_Edit[1]) local password = guiGetText(GUIEditor_Edit[2]) -- if the username and password both exist if ( username and password ) then triggerServerEvent("submitLogin", localPlayer, username, password) guiSetInputEnabled(false) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else outputChatBox("Porfavor pon tu Nick y tu Contraseña.") end end end Server-Side function loginHandler(username, password) if ( username == "user" and password == "apple" ) then spawnPlayer(source, 0, 0, -400) fadeCamera(source, true) setCameraTarget( source ) outputChatBox("Bienvenido a mi Server.", source) else outputChatBox("Invalido Nick o Contraseña Incorrecta Porfavor intente nuevamente.", source) end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler)
-
mmm... u can help me how uniting with the client-side ? function loginPlayer () local account = getAccount ( username, password ) -- Return the account if ( account ~= false ) then -- If the account exists. logIn ( thePlayer, account, password ) -- Log them in. else outputChatBox ( "Contraseña incorrecta!", thePlayer, 255, 255, 0 ) -- Output they got the details wrong. end end This is good ? or dont ?
-
I dont know how uniting but this is bad or not ? function clientAttemptLogin(username,password) local userAccount = getAccount(username) local tryToLog if (client) then tryToLog = logIn(client,userAccount,password) if (tryToLog) then
-
when I type my Nick and my Password I cant logg me appear in chatbox = the nick or the password is bad
-
sorry Solid I dont remember this , the problem is when I type /start MYRESOURCE dont appear the GUI :c
-
I want create my GUI Loggin But with the examples of wiki I done something bad, please help me Client-Side addEventHandler("onClientResourceStart",resourceRoot, function() GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(130,156,513,341,"GUI Login-Register By ElMota",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,38,495,294,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Login",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(12,46,21,21,"Nick",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],200, 0, 0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Edit[1] = guiCreateEdit(42,42,158,23,"",false,GUIEditor_Tab[1]) guiEditSetMaxLength(GUIEditor_Edit[1],22) GUIEditor_Label[2] = guiCreateLabel(8,113,63,19,"Contraseña",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[2],200 ,0 ,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Edit[2] = guiCreateEdit(75,108,134,26,"",false,GUIEditor_Tab[1]) guiEditSetMasked(GUIEditor_Edit[2],true) guiEditSetMaxLength(GUIEditor_Edit[2],5) GUIEditor_Button[1] = guiCreateButton(17,182,190,54,"Loggearme",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Memo[1] = guiCreateMemo(260,25,222,108,"Favor Loggearse :\n\nPrivilegios de estar loggeado :\n\n- se te guardaran todos tus datos en mi sistema mySQL",false,GUIEditor_Tab[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Label[3] = guiCreateLabel(213,228,268,34,"GUI Creada por ElMota CopyRight 2011-2012 (c)",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],200,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(132,146,354,28,"Acepto los Terminos y Condiciones de este Servidor",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Checkbox[2] = guiCreateCheckBox(28,80,194,22,"Mostrar Contraseña",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[2],"default-bold-small") GUIEditor_Tab[2] = guiCreateTab("Register",GUIEditor_TabPanel[1]) GUIEditor_Label[4] = guiCreateLabel(4,32,26,16,"Nick",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[4],200,0,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(35,23,176,30,"aaaaaaa",false,GUIEditor_Tab[2]) guiEditSetMaxLength(GUIEditor_Edit[3],23) GUIEditor_Label[5] = guiCreateLabel(2,80,65,22,"Contraseña",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[5],200,0,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Edit[4] = guiCreateEdit(73,74,140,31,"",false,GUIEditor_Tab[2]) guiEditSetMasked(GUIEditor_Edit[4],true) guiEditSetMaxLength(GUIEditor_Edit[4],5) GUIEditor_Label[6] = guiCreateLabel(3,128,40,16,"e-mail",false,GUIEditor_Tab[2]) guiLabelSetColor(GUIEditor_Label[6],200,0,0) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Edit[5] = guiCreateEdit(47,118,168,30,"",false,GUIEditor_Tab[2]) guiEditSetMaxLength(GUIEditor_Edit[5],20) GUIEditor_Button[2] = guiCreateButton(14,179,207,68,"Registrarme",false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Button[2],"sa-header") GUIEditor_Memo[2] = guiCreateMemo(243,17,240,128,"Recuerda antes De loggearte debes estar registrado aqui osino no podras jugar ^^ GUI Creada por ElMota (c)",false,GUIEditor_Tab[2]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) GUIEditor_Checkbox[3] = guiCreateCheckBox(246,162,215,28,"Mostrar Contraseña",false,false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Checkbox[3],"default-bold-small") GUIEditor_Checkbox[4] = guiCreateCheckBox(223,217,263,21,"Acepto los terminos y Condiciones de este server",false,false,GUIEditor_Tab[2]) guiSetFont(GUIEditor_Checkbox[4],"default-small") guiSetVisible(GUIEditor_Window[1], false) end ) function lol() outputChatBox("Bienvenido a mi Servidor de MTA porfavor Loggeate.") -- if the GUI was successfully created, then show the GUI to the player if (GUIEditor_Window[1] ~= nil) then guiSetVisible(GUIEditor_Window[1], true) else -- if the GUI hasnt been properly created, tell the player outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end ) addEventHandler("onClientGUIClick", GUIEditor_Button[1], clientSubmitLogin, false) function clientSubmitLogin(button,state) if button == "left" and state == "up" then local username = guiGetText(GUIEditor_Edit[1]) local password = guiGetText(GUIEditor_Edit[2]) -- if the username and password both exist if username and password then triggerServerEvent("submitLogin", getRootElement(), username, password) guiSetInputEnabled(false) guiSetVisible(GUIEditor_Window, false) showCursor(false) else outputChatBox("Porfavor pon tu Nick y tu Contraseña.") end end end Server-Side function loginHandler(username,password) if username == "user" and password == "apple" then if (client) then spawnPlayer(client, 0, 0, -400) fadeCamera(client, true) setCameraTarget(client, client) outputChatBox("Bienvenido a mi Server.", client) end else outputChatBox("Invalido Nick o Contraseña Incorrecta Porfavor intente nuevamente.",client) end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler) Please help me
-
Dont . I dont remember put the server-side in my meta.xml but dont Deathwarp only change the skin to 0 ( CJ )
-
what are bad ? Client-Side : GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(216,165,349,283,"GuiDeathWarping",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(10,219,205,47,"DeathWarp",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Image[1] = guiCreateStaticImage(28,33,280,116,"images/logobkz.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(39,146,272,28,"Server y GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0, 255, 0) guiSetFont(GUIEditor_Label[1],"clear-normal") addEventHandler ( "onClientGUIClick", GUIEditor_Button[1], function ( ) triggerServerEvent ( "deathWarp", localPlayer ) end ,false ) bindKey("F6","down", function () guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) Server-Side : addEvent ( "deathWarp", true ) addEventHandler ( "deathWarp", root, function ( ) spawnPlayer ( source, 680.07605, -2737.64502, 8.50925 ) end ) Problem in Console : [2012-03-20 10:44:11] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:11] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:14] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:15] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:15] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:16] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:17] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:17] ERROR: Client triggered serverside event deathWarp, but event is not added serverside [2012-03-20 10:44:19] ERROR: Client triggered serverside event deathWarp, but event is not added serverside Pleaase help me
-
But this coordinates is for where Spawn ?
-
Ok man Thnx But 1 Problem Solid Wrote = -- Change 0, 0, 5 to your spawn coordinates. I dont understand it man
-
dont man and thnx but I have the GUI for spawn player because when the player dead spawned in the script of spawns of 50p
-
Dont man death warp is when the player wasted and after he can spawn when he dead u understand me, and the community dont have scripts of deathwarping
-
Yeah sparrow and here is the GUI GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(216,165,349,283,"GuiDeathWarping",false) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(10,219,205,47,"DeathWarp",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Image[1] = guiCreateStaticImage(28,33,280,116,"images/logobkz.png",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(39,146,272,28,"Server y GUI Creada por ElMota",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],0, 255, 0) guiSetFont(GUIEditor_Label[1],"clear-normal") help me please
-
I want do a DeathWarp GUI but I dont know the events or functions , now Im doing the GUI please help me