-
Posts
1,708 -
Joined
-
Last visited
Everything posted by iFoReX
-
sigue sin servir edikosh <.< cl-side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} rotation = 0 GUIEditor_Window[1] = guiCreateWindow(0.75,0,0.25,0.9967,"GUI IDs",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(25,28,113,21,"Escoge el ID ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,63,182,463,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Button[1] = guiCreateButton(10,532,181,37,"Empezar a Jugar",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0,0,0.245,0.4567,"GUI Seleccion",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[2] = guiCreateButton(23,36,57,31,"<",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(80,36,57,31,">",false,GUIEditor_Window[2]) GUIEditor_Label[2] = guiCreateLabel(27,78,100,22,"NameTag Color",false,GUIEditor_Window[2]) GUIEditor_Edit[1] = guiCreateEdit(65,98,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(52,101,9,15,"R",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) GUIEditor_Edit[2] = guiCreateEdit(65,123,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(52,127,9,15,"G",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[4],0,255,0) GUIEditor_Edit[3] = guiCreateEdit(65,147,61,23,"",false,GUIEditor_Window[2]) GUIEditor_Label[5] = guiCreateLabel(52,151,9,15,"B",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) GUIEditor_Label[6] = guiCreateLabel(9,189,83,17,"Nombre del ID",false,GUIEditor_Window[2]) GUIEditor_Edit[4] = guiCreateEdit(96,186,91,23,"",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(9,230,169,28,"Crear Personaje/ID",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) addEvent("onVisible",true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showCursor(true) triggerServerEvent("onCameraMatrix", getLocalPlayer()) ped = createPed( 0, -1586.671875, 1351.53125, 8.2823114395142 ) getSkin = getElementModel( ped ) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) setCameraTarget( localPlayer ) elseif source == GUIEditor_Button[2] then end end ) function rotateTempPed ( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end addEvent("onRotatePed", true) addEventHandler("onRotatePed", root, rotateTempPed) sv-side addEventHandler("onPlayerLogin", getRootElement(), function() triggerClientEvent(source,"onVisible",source) triggerClientEvent("onRotatePed", getRootElement()) end ) addEvent("onCameraMatrix", true) addEventHandler("onCameraMatrix", getRootElement(), function() setCameraMatrix( source, -1570.66796875, 1358.087890625, 11.218300819397, -1586.671875, 1351.53125, 8.2823114395142 ) end ) -.-
-
Si lo e chequeado ya artas veces y sigue sin rotar
-
no se no entiendo nada acerca de eso de la rotacion eso lo saque de otro script mio que era una tienda de skins y funcionaba perfecto asi , ademas no se como hacerle para que al precionar un boton aga otro skin
-
no se no entiendo nada acerca de eso de la rotacion eso lo saque de otro script mio que era una tienda de skins y funcionaba perfecto asi
-
llevo esto asta ahora GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} rotation = 0 GUIEditor_Window[1] = guiCreateWindow(0.75,0,0.25,0.9967,"GUI IDs",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(25,28,113,21,"Escoge el ID ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,63,182,463,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Button[1] = guiCreateButton(10,532,181,37,"Empezar a Jugar",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0,0,0.245,0.4567,"GUI Seleccion",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[2] = guiCreateButton(23,36,57,31,"<",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(80,36,57,31,">",false,GUIEditor_Window[2]) GUIEditor_Label[2] = guiCreateLabel(27,78,100,22,"NameTag Color",false,GUIEditor_Window[2]) GUIEditor_Edit[1] = guiCreateEdit(65,98,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(52,101,9,15,"R",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) GUIEditor_Edit[2] = guiCreateEdit(65,123,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(52,127,9,15,"G",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[4],0,255,0) GUIEditor_Edit[3] = guiCreateEdit(65,147,61,23,"",false,GUIEditor_Window[2]) GUIEditor_Label[5] = guiCreateLabel(52,151,9,15,"B",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) GUIEditor_Label[6] = guiCreateLabel(9,189,83,17,"Nombre del ID",false,GUIEditor_Window[2]) GUIEditor_Edit[4] = guiCreateEdit(96,186,91,23,"",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(9,230,169,28,"Crear Personaje/ID",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) addEvent("onVisible",true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showCursor(true) triggerServerEvent("onCameraMatrix", getLocalPlayer()) ped = createPed( 0, -1586.671875, 1351.53125, 8.2823114395142 ) end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) setCameraTarget( localPlayer ) end end ) function rotateTempPed ( ) if isElement ( ped ) then rotation = rotation + 1 if ( rotation > 359 ) then rotation = 0 end setPedRotation ( ped, rotation ) end end sv-side addEventHandler("onPlayerLogin", getRootElement(), function() triggerClientEvent("onVisible", getRootElement()) end ) addEvent("onCameraMatrix", true) addEventHandler("onCameraMatrix", getRootElement(), function() setCameraMatrix( source, -1570.66796875, 1358.087890625, 11.218300819397, -1586.671875, 1351.53125, 8.2823114395142 ) end ) no me funciona la function de rotacion
-
ya llevo un poco me falta crear el ped el set camera ponerle evento a los botones y listo GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.75,0,0.25,0.9967,"GUI IDs",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(25,28,113,21,"Escoge el ID ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,63,182,463,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Button[1] = guiCreateButton(10,532,181,37,"Empezar a Jugar",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0,0,0.245,0.4567,"GUI Seleccion",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[2] = guiCreateButton(23,36,57,31,"<",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(80,36,57,31,">",false,GUIEditor_Window[2]) GUIEditor_Label[2] = guiCreateLabel(27,78,100,22,"NameTag Color",false,GUIEditor_Window[2]) GUIEditor_Edit[1] = guiCreateEdit(65,98,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(52,101,9,15,"R",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) GUIEditor_Edit[2] = guiCreateEdit(65,123,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(52,127,9,15,"G",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[4],0,255,0) GUIEditor_Edit[3] = guiCreateEdit(65,147,61,23,"",false,GUIEditor_Window[2]) GUIEditor_Label[5] = guiCreateLabel(52,151,9,15,"B",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) GUIEditor_Label[6] = guiCreateLabel(9,189,83,17,"Nombre del ID",false,GUIEditor_Window[2]) GUIEditor_Edit[4] = guiCreateEdit(96,186,91,23,"",false,GUIEditor_Window[2]) GUIEditor_Button[4] = guiCreateButton(9,230,169,28,"Crear Personaje/ID",false,GUIEditor_Window[2]) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(false) addEvent("onVisible",true) addEventHandler("onVisible", getLocalPlayer(), function() guiSetVisible(GUIEditor_Window[1],true) guiSetVisible(GUIEditor_Window[2],true) showCursor(true) setCameraMatrix(-1570.66796875, 1358.087890625, 11.218300819397 end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) showCursor(true) setElementPosition( localPlayer, 2580.7265625, 2328.77734375, 17.822208404541) end end ) como ves estoy creando el setcamera matrix xDD sv-side addEventHandler("onPlayerLogin", getRootElement(), function() triggerClientEvent("onVisible", getRootElement()) end ) xDD
-
no, te sale un camera matrix y si uno presiona un boton se devuelve al skin que tenias y si uno presiona > es otro skin no se si me entendes y gracias por el cumplido
-
Listo dime si te gusta o no ahora ai q poner los eventos GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.75,0,0.25,0.9967,"GUI IDs",true) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(25,28,113,21,"Escoge el ID ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Grid[1] = guiCreateGridList(9,63,182,463,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"ID",0.2) GUIEditor_Button[1] = guiCreateButton(10,532,181,37,"Empezar a Jugar",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0,0,0.2475,0.4167,"GUI Seleccion",true) guiWindowSetMovable(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[2] = guiCreateButton(23,36,57,31,"<",false,GUIEditor_Window[2]) GUIEditor_Button[3] = guiCreateButton(80,36,57,31,">",false,GUIEditor_Window[2]) GUIEditor_Label[2] = guiCreateLabel(27,78,100,22,"NameTag Color",false,GUIEditor_Window[2]) GUIEditor_Edit[1] = guiCreateEdit(65,98,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[1],3) GUIEditor_Label[3] = guiCreateLabel(52,101,9,15,"R",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) GUIEditor_Edit[2] = guiCreateEdit(65,123,61,23,"",false,GUIEditor_Window[2]) guiEditSetMaxLength(GUIEditor_Edit[2],3) GUIEditor_Label[4] = guiCreateLabel(52,127,9,15,"G",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[4],0,255,0) GUIEditor_Edit[3] = guiCreateEdit(65,147,61,23,"",false,GUIEditor_Window[2]) GUIEditor_Label[5] = guiCreateLabel(52,151,9,15,"B",false,GUIEditor_Window[2]) guiLabelSetColor(GUIEditor_Label[5],0,0,255) GUIEditor_Label[6] = guiCreateLabel(9,189,83,17,"Nombre del ID",false,GUIEditor_Window[2]) GUIEditor_Edit[4] = guiCreateEdit(96,186,91,23,"",false,GUIEditor_Window[2]) Aqui una IMG dime si te gusta o no
-
como usar esta funcion ? guiEditSetCaretIndex ??
-
Ok Soren pero me tienes que decir como quieres que sea la estructura y eso :3
-
yeah , why I dont want When the player write again the Text change I want when the player write again appear a new text down of the first
-
is more easy it cl-side carrosWindow = guiCreateWindow(100,100,175,200,"Criador de Carros",false) carrosList = guiCreateGridList ( 0.05, 0.10, 0.9, 0.7, true, carrosWindow) column = guiGridListAddColumn( carrosList, "Cars", 0.85 ) carrosCreate = guiCreateButton(05,170,85,45,"Create",false,carrosWindow) carrosClose = guiCreateButton(110,170,50,45,"Close",false,carrosWindow) guiWindowSetSizable( carrosWindow,false) guiSetVisible( carrosWindow, false ) row = guiGridListAddRow( carrosList ) row2 = guiGridListAddRow( carrosList ) guiGridListSetItemText( carrosList, row, column, "Rumpo", false, false ) guiGridListSetItemText( carrosList, row2, column, "PutUrCar", false, false ) carrosMarker = createMarker( 1543.98962, -1670.46398, 12.55753, "cylinder", 1.5, 255, 0, 0, 170 ) function elMarker( hitPlayer ) if ( hitPlayer == localPlayer ) then guiSetVisible ( carrosWindow, true ) end end addEventHandler ( "onClientMarkerHit", carrosMarker, elMarker) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == carrosClose ) then guiSetVisible ( carrosWindow, false ) elseif ( source == carrosCreate ) then triggerServerEvent("CreateCarros", getLocalPlayer()) end end ) sv-side addEvent("CreateCarros", true) addEventHandler("CreateCarros", getRootElement(), function() carros = createVehicle ( 440,0,0,0) warpPedIntoVehicle ( carros ) end )
-
Ninguem , WarpPedIntoVehicle is server-side ad the components of the GUI are client-side , this code never work, u need trigger with a triggerServerEvent
-
@tittle why my message appear two times ? I want if the player has wrote in the edit set The text the memo and if he write after the text appear down of the anterior here the .lua GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.3375,0.1983,0.5013,0.655,"GUI PM",true) guiWindowSetSizable(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,46,96,28,"",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(9,57,383,281,"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Edit[1] = guiCreateEdit(10,344,288,36,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(302,346,85,37,"Enviar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(36,27,335,32,"PM A : ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Window[2] = guiCreateWindow(0.1663,0.1983,0.1737,0.6533,"GUI Players",true) GUIEditor_Grid[1] = guiCreateGridList(10,28,122,375,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.6) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) function clientsideResourceStart () guiGridListClear(GUIEditor_Grid[1]) if (guiGridListClear) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), clientsideResourceStart ) addEventHandler("onClientGUIDoubleClick", root, function() if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) guiSetText(GUIEditor_Label[2], "PM a : "..playername) local thePlayer = getPlayerFromName ( playername ) end end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then local getText = guiGetText(GUIEditor_Edit[1]) local getName = getPlayerName( localPlayer ) setText = guiSetText(GUIEditor_Memo[1], ""..getName.." : "..getText.."") if (setText) then getTexts = guiGetText(GUIEditor_Memo[1]) guiSetText(GUIEditor_Memo[1], ""..getTexts.."\n\ "..getName.." : "..getText.."") end end end ) ?
-
Es verdad me funciono con el 0 igual gracias a todos los que me ayudaron
-
como dice en el tittulo quiero saber como aser para que si un texto ya este escrito luego se escriba otro abajo GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.3375,0.1983,0.5013,0.655,"GUI PM",true) guiWindowSetSizable(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,46,96,28,"",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(9,57,383,281,"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Edit[1] = guiCreateEdit(10,344,288,36,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(302,346,85,37,"Enviar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(36,27,335,32,"PM A : ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Window[2] = guiCreateWindow(0.1663,0.1983,0.1737,0.6533,"GUI Players",true) GUIEditor_Grid[1] = guiCreateGridList(10,28,122,375,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.6) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) function clientsideResourceStart () guiGridListClear(GUIEditor_Grid[1]) if (guiGridListClear) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), clientsideResourceStart ) addEventHandler("onClientGUIDoubleClick", root, function() if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) guiSetText(GUIEditor_Label[2], "PM a : "..playername) local thePlayer = getPlayerFromName ( playername ) end end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then local getText = guiGetText(GUIEditor_Edit[1]) local getName = getPlayerName( localPlayer ) setText = guiSetText(GUIEditor_Memo[1], ""..getName.." : "..getText.."") if (setText) then getTexts = guiGetText(GUIEditor_Memo[1]) guiSetText(GUIEditor_Memo[1], ""..getTexts.."\n\ "..getName.." : "..getText.."") end end end ) Ise esto pero esto me crea 2 textos a la vez
-
setTimer( guiProgressBarSetProgress, 240000, 1,GUIEditor_Progress[1],0) ahora no me funciona esto
-
como dice en el titulo mi setTimer no funciona en el debugging me dice bad argument (got boolean) y tambn bad argument(got nil) aqui el .lua GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Progress = {} GUIEditor_Window[1] = guiCreateWindow(0.3425,0.45,0.3562,0.325,"",true) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Edit[1] = guiCreateEdit(78,39,181,29,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[1],true) GUIEditor_Edit[2] = guiCreateEdit(78,77,181,29,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[2],true) GUIEditor_Edit[3] = guiCreateEdit(78,115,181,29,"",false,GUIEditor_Window[1]) guiEditSetReadOnly(GUIEditor_Edit[3],true) GUIEditor_Label[1] = guiCreateLabel(47,38,28,28,"PosX",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],255,0,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(47,80,28,28,"PosY",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[2],255,0,0) guiSetFont(GUIEditor_Label[2],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(47,121,28,28,"PosZ",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[3],255,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(9,157,102,29,"ObtenerPosicion",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(219,158,57,26,"Limpiar",false,GUIEditor_Window[1]) GUIEditor_Progress[1] = guiCreateProgressBar(0.4375,0.3967,0.1912,0.055,true) guiProgressBarSetProgress(GUIEditor_Progress[1], 0) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Button[2],false) guiSetVisible(GUIEditor_Progress[1],false) showCursor(false) bindKey("F6","down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) guiSetVisible(GUIEditor_Progress[1], not guiGetVisible(GUIEditor_Progress[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[2] ) then guiSetText ( GUIEditor_Edit[1], " " ) guiSetText ( GUIEditor_Edit[2], " " ) guiSetText ( GUIEditor_Edit[3], " " ) guiSetVisible ( GUIEditor_Button[2], false ) elseif ( source == GUIEditor_Button[1] ) then local x, y, z = getElementPosition ( localPlayer ) getProgress = guiProgressBarGetProgress(GUIEditor_Progress[1]) guiSetVisible(GUIEditor_Progress[1],true) guiProgressBarSetProgress(GUIEditor_Progress[1], getProgress + 20) guiSetText ( GUIEditor_Edit[1], x ) guiSetText ( GUIEditor_Edit[2], y ) guiSetText ( GUIEditor_Edit[3], z ) guiSetVisible ( GUIEditor_Button[2], true ) triggerServerEvent ( "onSavePos", localPlayer, x, y, z ) if getProgress == 100 then guiSetVisible(GUIEditor_Button[1],false) setTimer( (guiSetVisible(GUIEditor_Button[1],true)), 240000, 1 ) outputChatBox("Tendras que esperar 4 minutos para poder ver tus Posiciones denuevo", localPlayer, 255, 255, 0, true) end end end ) gracias de antemano
-
lo arregle GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.3375,0.1983,0.5013,0.655,"GUI Sistema de Perfil",true) guiWindowSetSizable(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,46,96,28,"",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(9,57,383,281,"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Edit[1] = guiCreateEdit(10,344,288,36,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(302,346,85,37,"Enviar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(36,27,335,32,"PM A : ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Window[2] = guiCreateWindow(0.1663,0.1983,0.1737,0.6533,"GUI Players",true) GUIEditor_Grid[1] = guiCreateGridList(10,28,122,375,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.6) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) function clientsideResourceStart () guiGridListClear(GUIEditor_Grid[1]) if (guiGridListClear) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), clientsideResourceStart ) addEventHandler("onClientGUIDoubleClick", root, function() if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) guiSetText(GUIEditor_Label[2], "PM a : "..playername) local thePlayer = getPlayerFromName ( playername ) end end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then local getText = guiGetText(GUIEditor_Edit[1]) local getName = getPlayerName( localPlayer ) guiSetText(GUIEditor_Memo[1], ""..getName.." : "..getText.."") end end ) ahora como podria aser para si el player aya escrito se obtiene el texto 1 espacio mas abajo ?
-
Solid ya me di cuenta tenia algo malo ya lo copie denuevo tu codigo y no me dio error y se creo en el archivo .txt muchas gracias solid
-
aqui el codigo no me funciona me aparece a boolean value GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.3375,0.1983,0.5013,0.655,"GUI Sistema de Perfil",true) guiWindowSetSizable(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,46,96,28,"",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(9,57,383,281,"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Edit[1] = guiCreateEdit(10,344,288,36,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(302,346,85,37,"Enviar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(36,27,335,32,"PM A : ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Window[2] = guiCreateWindow(0.1663,0.1983,0.1737,0.6533,"GUI Players",true) GUIEditor_Grid[1] = guiCreateGridList(10,28,122,375,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.6) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) function clientsideResourceStart () guiGridListClear(GUIEditor_Grid[1]) if (guiGridListClear) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), clientsideResourceStart ) addEventHandler("onClientGUIDoubleClick", root, function() if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) guiSetText(GUIEditor_Label[2], "PM a : "..playername) local thePlayer = getPlayerFromName ( playername ) end end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then local getText = guiGetText(GUIEditor_Edit[1]) local getName = getPlayerName( localPlayer ) guiSetText(GUIEditor_Memo[1], "..getName : "..getText..) end end )
-
#OFFtopic no doble postees solo editalo , te ubiera ayudado pero no se nada de mysql
-
en q function ? cl-side o sv-side ?
-
creo que abria que ir asiendo una tabla y loops
