-
Posts
1,708 -
Joined
-
Last visited
Everything posted by iFoReX
-
I have a problem with a argument of my bindkey :c cl-side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.4925,0.3317,0.51,0.6717,"GUI Admin",true) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(11,87,167,307,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) GUIEditor_Edit[1] = guiCreateEdit(11,46,167,34,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(191,46,103,38,"Mute",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(191,96,103,38,"Ban",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(191,146,103,38,"Kick",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(191,200,103,38,"Dimension",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(191,259,103,38,"Warp to Player",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(190,345,213,51,"Admin Panel By ElMota",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[6] = guiCreateButton(313,46,86,38,"Resources",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0.35,0.2783,0.3388,0.4217,"Ban Times",true) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[7] = guiCreateButton(32,39,189,40,"1 Year",false,GUIEditor_Window[2]) GUIEditor_Button[8] = guiCreateButton(32,87,189,40,"1 Month",false,GUIEditor_Window[2]) GUIEditor_Button[9] = guiCreateButton(32,138,189,38,"1 Day",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(172,216,90,28,"Cancelar",false,GUIEditor_Window[2]) GUIEditor_Window[3] = guiCreateWindow(0.2988,0.2867,0.4737,0.4267,"Dimension GUI",true) GUIEditor_Label[2] = guiCreateLabel(48,102,107,18,"Set Dimension ...",false,GUIEditor_Window[3]) GUIEditor_Edit[2] = guiCreateEdit(131,123,65,27,"",false,GUIEditor_Window[3]) GUIEditor_Button[11] = guiCreateButton(246,199,120,44,"Set Dimension",false,GUIEditor_Window[3]) GUIEditor_Button[12] = guiCreateButton(9,199,120,44,"Cancel",false,GUIEditor_Window[3]) GUIEditor_Window[4] = guiCreateWindow(0.3613,0.13,0.3025,0.845,"GUI Resources",true) guiWindowSetSizable(GUIEditor_Window[4],false) GUIEditor_Grid[2] = guiCreateGridList(21,71,201,358,false,GUIEditor_Window[4]) guiGridListSetSelectionMode(GUIEditor_Grid[2],2) guiGridListAddColumn(GUIEditor_Grid[2],"resources :",0.2) GUIEditor_Edit[3] = guiCreateEdit(23,32,197,35,"",false,GUIEditor_Window[4]) GUIEditor_Button[13] = guiCreateButton(141,453,92,37,"Start Resource",false,GUIEditor_Window[4]) GUIEditor_Button[14] = guiCreateButton(10,453,92,37,"Cancel",false,GUIEditor_Window[4]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) guiSetVisible(GUIEditor_Window[3],false) guiSetVisible(GUIEditor_Window[4],false) showCursor(false) function GUIOpen() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) guiSetVisible(GUIEditor_Window[2], not guiGetVisible(GUIEditor_Window[2])) guiSetVisible(GUIEditor_Window[3], not guiGetVisible(GUIEditor_Window[3])) guiSetVisible(GUIEditor_Window[4], not guiGetVisible(GUIEditor_Window[4])) showCursor(guiGetVisible(GUIEditor_Window[1])) end addEvent("onVisibleAdmin", true) addEventHandler("onVisibleAdmin", getLocalPlayer(), GUIOpen) sv-side -------------Server--------- function opGUI() local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent(source, "onVisibleAdmin", source) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() bindKey(source, "p","down", opGUI) end )
-
Nice But the link of maps doesnt work :c
-
yo lo edito en el map editor es mejor y le pones freeze time
-
Genial moredaror vas aprendiendo funciones y eso... ( investigando el script q te paso ), podrias reemplazar el spawnPlayer por un setElementPosition , osino poner timer a la funcion giveWeapon
-
Creo que es mas facil el CameraMatrix es esto mismo solo que mas resumido
-
If a player put a nick or password bad the GUI disappear D: help me please cl-side GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Radio = {} LoginWindow = guiCreateWindow(0.2763,0.3467,0.4863,0.3633,"Ventana de Loggeo",true) guiWindowSetMovable(LoginWindow,false) guiWindowSetSizable(LoginWindow,false) GUIEditor_Label[1] = guiCreateLabel(21,63,52,21,"Nick :",false,LoginWindow) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Edit[1] = guiCreateEdit(63,58,126,28,"",false,LoginWindow) GUIEditor_Label[2] = guiCreateLabel(19,110,74,19,"Contraseña : ",false,LoginWindow) GUIEditor_Edit[2] = guiCreateEdit(94,105,126,28,"",false,LoginWindow) GUIEditor_Label[3] = guiCreateLabel(19,147,227,19,"Si no Tienes una Cuenta registrate aqui : ",false,LoginWindow) guiLabelSetColor(GUIEditor_Label[3],255,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(19,168,100,36,"Registrarme",false,LoginWindow) GUIEditor_Checkbox[1] = guiCreateCheckBox(227,107,115,27,"Recordar Datos",false,false,LoginWindow) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(229,55,97,35,"Logearme",false,LoginWindow) GUIEditor_Label[4] = guiCreateLabel(196,188,181,16,"GUI Creada por ElMota (c) 2012",false,LoginWindow) guiLabelSetColor(GUIEditor_Label[4],255, 255, 0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Radio[1] = guiCreateRadioButton(17,26,81,21,"Español",false,LoginWindow) guiRadioButtonSetSelected(GUIEditor_Radio[1],true) GUIEditor_Radio[2] = guiCreateRadioButton(109,26,81,21,"English",false,LoginWindow) RegisterWindow = guiCreateWindow(0.2937,0.3533,0.4437,0.3517,"Ventana de Registrarse",true) guiWindowSetMovable(RegisterWindow,false) guiWindowSetSizable(RegisterWindow,false) GUIEditor_Label[5] = guiCreateLabel(11,26,142,17,"Pon datos que no Olvides",false,RegisterWindow) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Label[6] = guiCreateLabel(9,52,140,20,"---Datos Importantes.",false,RegisterWindow) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Label[7] = guiCreateLabel(12,85,52,21,"Nick :",false,RegisterWindow) guiSetFont(GUIEditor_Label[7],"clear-normal") GUIEditor_Edit[3] = guiCreateEdit(50,80,100,26,"",false,RegisterWindow) GUIEditor_Label[8] = guiCreateLabel(12,127,87,17,"Contraseña :",false,RegisterWindow) guiSetFont(GUIEditor_Label[8],"clear-normal") GUIEditor_Edit[4] = guiCreateEdit(100,122,100,26,"",false,RegisterWindow) GUIEditor_Label[9] = guiCreateLabel(12,179,42,16,"Sexo :",false,RegisterWindow) guiSetFont(GUIEditor_Label[9],"clear-normal") GUIEditor_Radio[3] = guiCreateRadioButton(62,174,65,25,"Hombre",false,RegisterWindow) guiRadioButtonSetSelected(GUIEditor_Radio[3],true) guiSetFont(GUIEditor_Radio[3],"default-bold-small") GUIEditor_Radio[4] = guiCreateRadioButton(134,174,65,25,"Mujer",false,RegisterWindow) guiSetFont(GUIEditor_Radio[4],"default-bold-small") GUIEditor_Label[10] = guiCreateLabel(216,29,52,16,"ESPAÑOL",false,RegisterWindow) guiLabelSetColor(GUIEditor_Label[10],0,0,255) guiSetFont(GUIEditor_Label[10],"default-bold-small") GUIEditor_Label[11] = guiCreateLabel(294,29,52,16,"ENGLISH",false,RegisterWindow) guiLabelSetColor(GUIEditor_Label[11],0,0,255) guiSetFont(GUIEditor_Label[11],"default-bold-small") GUIEditor_Button[3] = guiCreateButton(215,69,123,39,"Registrarme !",false,RegisterWindow) guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,false) guiEditSetMasked(GUIEditor_Edit[2],false) guiEditSetMasked(GUIEditor_Edit[4],false) showCursor(false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,true) showCursor(true) guiSetText(GUIEditor_Edit[1], ""..getPlayerName( localPlayer ).."") end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(RegisterWindow,true) guiSetVisible(LoginWindow,false) elseif source == GUIEditor_Button[2] then guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,false) showCursor(false) elseif source == GUIEditor_Button[3] then guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,false) showCursor(false) end 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 ( username and password ) then triggerServerEvent("submitLoginEM", localPlayer, username, password) guiSetVisible(LoginWindow, false) guiSetVisible(RegisterWindow, false) showCursor(false) else outputChatBox("Porfavor pon tu Nick y tu Contrase?a.") end end end addEventHandler("onClientGUIClick", GUIEditor_Button[2], clientSubmitLogin, false) sv-side function loginHandler(username,password) local acc = getAccount(username, password) if (acc) then logIn ( source, acc, password ) fadeCamera(source, true) setCameraTarget(source) outputChatBox("Enjoy your time!", source) else outputChatBox("invalid username and password. Please re-connect and try again.", source) end end addEvent("submitLoginEM",true) addEventHandler("submitLoginEM",root, loginHandler)
-
I cant download please upload in other mirror D:
-
mmm nose man es muy diferente al mio Buee aqui te dejo todo el mio no lo copies solo saca lo mas importante cl GUIEditor_Button = {} GUIEditor_Edit = {} rotation = 0 addEvent("onVisibleButtons", true) addEventHandler("onVisibleButtons", getLocalPlayer(), function() GUIEditor_Button[1] = guiCreateButton(0.3688,0.84,0.0625,0.055,"<",true) GUIEditor_Button[2] = guiCreateButton(0.5013,0.84,0.0625,0.055,">",true) GUIEditor_Button[3] = guiCreateButton(0.4013,0.9067,0.1287,0.065,"Empezar a Jugar",true) GUIEditor_Edit[1] = guiCreateEdit(0.4412,0.8367,0.05,0.0567,"0",true) guiEditSetReadOnly(GUIEditor_Edit[1],true) lsT() showCursor(true) bindKey("space", "down", theR) ped = createPed( 0, 756.03051757813, -1239.4184570313, 13.552116394043 ) setElementData(ped,"City","LS") end) numero = 0 addEventHandler("onClientGUIClick", root,function(button,state) if source == GUIEditor_Button[3] then local elements ={GUIEditor_Button[1],GUIEditor_Button[2],GUIEditor_Button[3],GUIEditor_Edit[1]} for i,v in ipairs(elements)do destroyElement(v) end showCursor(false) setCameraTarget( localPlayer ) triggerServerEvent("giveWeapons", getLocalPlayer()) destroyElement(ped) unbindKey("space","down",theR) local renders = {lsT,lvT,sfT} for k,b in ipairs(renders)do removeEventHandler("onClientRender",root,b) end setPedSkin(localPlayer,numero) setElementFrozen(localPlayer,false) elseif source == GUIEditor_Button[1] then if (button == "left" and state == "up") then if(numero == 0) then numero = 288 setElementModel(ped,numero) end numero = numero - 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."") elseif source == GUIEditor_Button[2] then if (button == "left" and state == "up") then if (numero == 289) then numero = 0 setElementModel(ped,numero) end numero = numero + 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."") end end,true) addEventHandler("onClientRender", root,function( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end) function lsT() addEventHandler("onClientRender", root, lsT) dxDrawText("Los Santos",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end function bLV() if source == GUIEditor_Button[3] then setElementPosition( localPlayer, 2137.7775878906, 1480.8577880859, 10.8203125 ) end end function bSF() if source == GUIEditor_Button[3] then setElementPosition( localPlayer, -1695.2707519531, 950.0751953125, 24.890625 ) end end function bLS() if source == GUIEditor_Button[3] then setElementPosition( localPlayer, 731.21276855469, -1276.6033935547, 17.6484375 ) end end function theR() if(getElementData(ped,"City")=="LS")then removeEventHandler("onClientRender", root, lsT) setTimer(lvT,1000,1) triggerServerEvent("onCameraLV", getLocalPlayer()) setElementData(ped,"City","LV") setElementPosition(ped, 2323.7517089844, 1283.2214355469, 97.592704772949 ) addEventHandler("onClientGUIClick", root, bLV) elseif(getElementData(ped,"City")=="LV")then removeEventHandler("onClientRender",root,lvT) setTimer(sfT,1000,1) triggerServerEvent("onCameraSF", getLocalPlayer()) setElementData(ped,"City","SF") setElementPosition(ped,-1480.8948974609, 920.17132568359, 71.350372314453) addEventHandler("onClientGUIClick", root, bSF) elseif(getElementData(ped,"City")=="SF")then removeEventHandler("onClientRender",root,sfT) setTimer(lsT,1000,1) triggerServerEvent("onCameraLS", getLocalPlayer()) setElementData(ped,"City","LS") setElementPosition(ped,756.03051757813, -1239.4184570313, 13.552116394043) addEventHandler("onClientGUIClick", root, bLS) end end addCommandHandler("target", function() setCameraTarget( localPlayer ) end ) function lvT() addEventHandler("onClientRender", root, lvT) dxDrawText("Las Venturas",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end function sfT() addEventHandler("onClientRender", root, sfT) sf = dxDrawText("San Fierro",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() triggerServerEvent("onMyStart", getLocalPlayer()) end ) sv-side function visible() triggerClientEvent(source, "onVisibleButtons", root) setCameraMatrix(source,755.94171142578, -1258.78125, 18.399745941162, 756.03051757813, -1239.4184570313, 13.552116394043) fadeCamera(source,true) end addEvent("onVisibleDead", true) addEventHandler("onPlayerWasted", getRootElement(), visible) addEventHandler("onPlayerLogin",root, visible) addEvent("onCameraLV", true) addEventHandler("onCameraLV", root,function() setCameraMatrix( client, 2322.7954101563, 1257.611328125, 102.61512756348, 2323.7517089844, 1283.2214355469, 97.592704772949 ) end) addEvent("onCameraSF", true) addEventHandler("onCameraSF",root, function() setCameraMatrix( client, -1509.7048339844, 921.08612060547, 75.827659606934, -1480.8948974609, 920.17132568359, 71.350372314453 ) end ) addEvent("onCameraLS", true) addEventHandler("onCameraLS", root, function() setCameraMatrix( client, 755.94171142578, -1258.78125, 18.399745941162, 756.03051757813, -1239.4184570313, 13.552116394043 ) end) addEvent("giveWeapons", true) addEventHandler("giveWeapons", getRootElement(), function() giveWeapon( source, 31, 999 ) giveWeapon( source, 32, 999 ) end )
-
yo ise esto para mi script ai sacas lo que necesites elseif source == GUIEditor_Button[1] then if (button == "left" and state == "up") then if(numero == 0) then numero = 288 setElementModel(ped,numero) end numero = numero - 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."") elseif source == GUIEditor_Button[2] then if (button == "left" and state == "up") then if (numero == 289) then numero = 0 setElementModel(ped,numero) end numero = numero + 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."")
-
No alexs. y si lo haces algo asi ped = createPed( SkinID, PosX, PosY, PosZ )
-
la camara o el ped ?
-
Prueba con esto : addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),selectorenable ) tenias malo el evento ya que es client creo o no ? si es sv-side [lua]addEventHandler("onResourceStart", getResourceRootElement(getThisResource()),selectorenable ) [/lua]
-
maauro si tienes un login-register Panel pon Cuando el player se logee haciendo un triggerClientEvent y en el sv-side pones como evento 'onPlayerLogin' es mejor asi no te aparecen todas las GUI juntas
-
very THAAAAAAAAAAAAANK YOU ! Work 100000000000000000% Now I put giveWeapon and the SpawnGUI will finished When I start it Script all screen in black D:
-
doesnt disappear D:
-
I copied it, again doesnt disappear D:
-
Again the text doesnt disappear
-
yeh when I press the button doesnt disappear the text : I done it : GUIEditor_Button = {} GUIEditor_Edit = {} rotation = 0 addEvent("onVisibleButtons", true) addEventHandler("onVisibleButtons", getLocalPlayer(), function() GUIEditor_Button[1] = guiCreateButton(0.3688,0.84,0.0625,0.055,"<",true) GUIEditor_Button[2] = guiCreateButton(0.5013,0.84,0.0625,0.055,">",true) GUIEditor_Button[3] = guiCreateButton(0.4013,0.9067,0.1287,0.065,"Empezar a Jugar",true) GUIEditor_Edit[1] = guiCreateEdit(0.4412,0.8367,0.05,0.0567,"0",true) guiEditSetReadOnly(GUIEditor_Edit[1],true) lsT() showCursor(true) bindKey("space", "down", theR) ped = createPed( 0, 756.03051757813, -1239.4184570313, 13.552116394043 ) setElementData(ped,"City","LS") end) numero = 0 addEventHandler("onClientGUIClick", root,function(button,state) if source == GUIEditor_Button[3] then local elements ={GUIEditor_Button[1],GUIEditor_Button[2],GUIEditor_Button[3],GUIEditor_Edit[1]} for i,v in ipairs(elements)do destroyElement(v) end showCursor(false) setCameraTarget( localPlayer ) destroyElement(ped) unbindKey("space") removeEventHandler("onClientRender", root, texto) removeEventHandler("onClientRender", root, theR) setPedSkin(localPlayer,numero) setElementFrozen(localPlayer,false) elseif source == GUIEditor_Button[1] then if (button == "left" and state == "up") then if(numero == 0) then numero = 288 setElementModel(ped,numero) end numero = numero - 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."") elseif source == GUIEditor_Button[2] then if (button == "left" and state == "up") then if (numero == 289) then numero = 0 setElementModel(ped,numero) end numero = numero + 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."") end end,true) addEventHandler("onClientRender", root,function( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end) function lsT() addEventHandler("onClientRender", root, lsT) dxDrawText("Los Santos",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end function bLV() if source == GUIEditor_Button[3] then setElementPosition( localPlayer, 2137.7775878906, 1480.8577880859, 10.8203125 ) end end function bSF() if source == GUIEditor_Button[3] then setElementPosition( localPlayer, -1695.2707519531, 950.0751953125, 24.890625 ) end end function bLS() if source == GUIEditor_Button[3] then setElementPosition( localPlayer, 731.21276855469, -1276.6033935547, 17.6484375 ) end end function theR() if(getElementData(ped,"City")=="LS")then removeEventHandler("onClientRender", root, lsT) setTimer(lvT,1000,1) triggerServerEvent("onCameraLV", getLocalPlayer()) setElementData(ped,"City","LV") setElementPosition(ped, 2323.7517089844, 1283.2214355469, 97.592704772949 ) addEventHandler("onClientGUIClick", root, bLV) elseif(getElementData(ped,"City")=="LV")then removeEventHandler("onClientRender",root,lvT) setTimer(sfT,1000,1) triggerServerEvent("onCameraSF", getLocalPlayer()) setElementData(ped,"City","SF") setElementPosition(ped,-1480.8948974609, 920.17132568359, 71.350372314453) addEventHandler("onClientGUIClick", root, bSF) elseif(getElementData(ped,"City")=="SF")then removeEventHandler("onClientRender",root,sfT) setTimer(lsT,1000,1) triggerServerEvent("onCameraLS", getLocalPlayer()) setElementData(ped,"City","LS") setElementPosition(ped,756.03051757813, -1239.4184570313, 13.552116394043) addEventHandler("onClientGUIClick", root, bLS) end end function lvT() addEventHandler("onClientRender", root, lvT) dxDrawText("Las Venturas",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end function sfT() addEventHandler("onClientRender", root, sfT) sf = dxDrawText("San Fierro",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end I add the spawns in 3 citys But the text doesnt disappear
-
The text doesnt disappear
-
igual entran y algunos nomas mueren D:
-
I done it now I cant put San Fierro in the Text D: cl-side GUIEditor_Button = {} GUIEditor_Edit = {} rotation = 0 addEvent("onVisibleButtons", true) addEventHandler("onVisibleButtons", getLocalPlayer(), function() GUIEditor_Button[1] = guiCreateButton(0.3688,0.84,0.0625,0.055,"<",true) GUIEditor_Button[2] = guiCreateButton(0.5013,0.84,0.0625,0.055,">",true) GUIEditor_Button[3] = guiCreateButton(0.4013,0.9067,0.1287,0.065,"Empezar a Jugar",true) GUIEditor_Edit[1] = guiCreateEdit(0.4412,0.8367,0.05,0.0567,"0",true) guiEditSetReadOnly(GUIEditor_Edit[1],true) lsT() showCursor(true) bindKey("space", "down", theR) ped = createPed( 0, 756.03051757813, -1239.4184570313, 13.552116394043 ) setElementData(ped,"City","LS") end) numero = 0 addEventHandler("onClientGUIClick", root,function(button,state) if source == GUIEditor_Button[3] then local elements ={GUIEditor_Button[1],GUIEditor_Button[2],GUIEditor_Button[3],GUIEditor_Edit[1]} for i,v in ipairs(elements)do destroyElement(v) end showCursor(false) setCameraTarget( localPlayer ) destroyElement(ped) unbindKey("space") removeEventHandler("onClientRender", root, texto) removeEventHandler("onClientRender", root, theR) local table = {{731.21276855469, -1276.6033935547, 17.6484375}} setElementPosition( localPlayer, 731.21276855469, -1276.6033935547, 17.6484375 ) setPedSkin(localPlayer,numero) setElementFrozen(localPlayer,false) elseif source == GUIEditor_Button[1] then if (button == "left" and state == "up") then if(numero == 0) then numero = 288 setElementModel(ped,numero) end numero = numero - 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."") elseif source == GUIEditor_Button[2] then if (button == "left" and state == "up") then if (numero == 289) then numero = 0 setElementModel(ped,numero) end numero = numero + 1 setElementModel(ped,numero) end guiSetText(GUIEditor_Edit[1], " "..getElementModel(ped).."") end end,true) addEventHandler("onClientRender", root,function( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end) function lsT() addEventHandler("onClientRender", root, lsT) dxDrawText("Los Santos",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end function theR() if(getElementData(ped,"City")=="LS")then removeEventHandler("onClientRender", root, lsT) setTimer(lvT,1000,1) triggerServerEvent("onCameraLV", getLocalPlayer()) setElementData(ped,"City","LV") ped = createPed( 0, 2323.7517089844, 1283.2214355469, 97.592704772949 ) elseif(getElementData(ped,"City")=="LV")then removeEventHandler("onClientRender",root,lvT) setTimer(sfT,1000,1) triggerServerEvent("onCameraSF", getLocalPlayer()) setElementData(ped,"City","SF") ped = createPed( 0, -1480.8948974609, 920.17132568359, 71.350372314453) elseif(getElementData(ped,"City")=="SF")then removeEventHandler("onClientRender",root,sfT) setTimer(lsT,1000,1) triggerServerEvent("onCameraLS", getLocalPlayer()) setElementData(ped,"City","LS") end end function lvT() addEventHandler("onClientRender", root, lvT) dxDrawText("Las Venturas",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end function sfT() addEventHandler("onClientRender", root, sfT) sf = dxDrawText("San Fierro",433.0,539.0,641.0,585.0,tocolor(255,255,255,255),3.0,"default","left","top",false,false,true) end sv-side addEventHandler("onPlayerLogin",root,function() triggerClientEvent(source, "onVisibleButtons", root) setCameraMatrix(source,755.94171142578, -1258.78125, 18.399745941162, 756.03051757813, -1239.4184570313, 13.552116394043) end) addEvent("onCameraLV", true) addEventHandler("onCameraLV", getRootElement(), function() setCameraMatrix( source, 2322.7954101563, 1257.611328125, 102.61512756348, 2323.7517089844, 1283.2214355469, 97.592704772949 ) end ) addEvent("onCameraSF", true) addEventHandler("onCameraSF", getRootElement(), function() setCameraMatrix( source, -1509.7048339844, 921.08612060547, 75.827659606934, -1480.8948974609, 920.17132568359, 71.350372314453 ) end ) addEvent("onCameraLS", true) addEventHandler("onCameraLS", getRootElement(), function() setCameraMatrix( source, 755.94171142578, -1258.78125, 18.399745941162, 756.03051757813, -1239.4184570313, 13.552116394043 ) end )
-
Ook Thank you I will use triggerServerEvent
-
thank you work 100% now how I can change the Camera if the player press space ? example = Las Venturas ( camera in Las Venturas ) thank you in advanced