-
Posts
1,708 -
Joined
-
Last visited
Everything posted by iFoReX
-
hize esto solid pero sigue sin funcionar GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(550,258,47,53,"images/cal.png",false) GUIEditor_Image[2] = guiCreateStaticImage(603,258,44,53,"images/calc-icon.png",false) GUIEditor_Image[3] = guiCreateStaticImage(653,258,44,55,"images/clock-icon.png",false) GUIEditor_Image[4] = guiCreateStaticImage(704,259,42,55,"images/graph-icon.png",false) GUIEditor_Image[5] = guiCreateStaticImage(555,463,42,52,"images/SMS-icon.png",false) GUIEditor_Image[6] = guiCreateStaticImage(603,463,47,51,"images/phone-icon.png",false) GUIEditor_Image[7] = guiCreateStaticImage(656,463,41,51,"images/ipod-icon.png",false) GUIEditor_Image[8] = guiCreateStaticImage(704,461,46,56,"images/photo-icon.png",false) guiSetVisible(GUIEditor_Image[1],false) guiSetVisible(GUIEditor_Image[2],false) guiSetVisible(GUIEditor_Image[3],false) guiSetVisible(GUIEditor_Image[4],false) guiSetVisible(GUIEditor_Image[5],false) guiSetVisible(GUIEditor_Image[6],false) guiSetVisible(GUIEditor_Image[7],false) guiSetVisible(GUIEditor_Image[8],false) showCursor(false) function elIphone() dxDrawImage(516.0,157.0,283.0,442.0,"images/blank-iphone.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) setElementData(getLocalPlayer(),"visible",viendose) end function remover() removeEventHandler("onClientRender",root,elIphone) setElementData(getLocalPlayer(),"visible",invisible) end bindKey("B","down",function() guiSetVisible(GUIEditor_Image[1],not guiGetVisible(GUIEditor_Image[1])) guiSetVisible(GUIEditor_Image[2],not guiGetVisible(GUIEditor_Image[2])) guiSetVisible(GUIEditor_Image[3],not guiGetVisible(GUIEditor_Image[3])) guiSetVisible(GUIEditor_Image[4],not guiGetVisible(GUIEditor_Image[4])) guiSetVisible(GUIEditor_Image[5],not guiGetVisible(GUIEditor_Image[5])) guiSetVisible(GUIEditor_Image[6],not guiGetVisible(GUIEditor_Image[6])) guiSetVisible(GUIEditor_Image[7],not guiGetVisible(GUIEditor_Image[7])) guiSetVisible(GUIEditor_Image[8],not guiGetVisible(GUIEditor_Image[8])) showCursor(guiGetVisible(GUIEditor_Image[1])) if getElementData(getLocalPlayer(),"visible") == viendose then addEventHandler("onClientRender",root,remover) elseif getElementData(getLocalPlayer(),"visible") == invisible then addEventHandler("onClientRender",root,elIphone) end end)
-
aqui los codigos GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(550,258,47,53,"images/cal.png",false) GUIEditor_Image[2] = guiCreateStaticImage(603,258,44,53,"images/calc-icon.png",false) GUIEditor_Image[3] = guiCreateStaticImage(653,258,44,55,"images/clock-icon.png",false) GUIEditor_Image[4] = guiCreateStaticImage(704,259,42,55,"images/graph-icon.png",false) GUIEditor_Image[5] = guiCreateStaticImage(555,463,42,52,"images/SMS-icon.png",false) GUIEditor_Image[6] = guiCreateStaticImage(603,463,47,51,"images/phone-icon.png",false) GUIEditor_Image[7] = guiCreateStaticImage(656,463,41,51,"images/ipod-icon.png",false) GUIEditor_Image[8] = guiCreateStaticImage(704,461,46,56,"images/photo-icon.png",false) guiSetVisible(GUIEditor_Image[1],false) guiSetVisible(GUIEditor_Image[2],false) guiSetVisible(GUIEditor_Image[3],false) guiSetVisible(GUIEditor_Image[4],false) guiSetVisible(GUIEditor_Image[5],false) guiSetVisible(GUIEditor_Image[6],false) guiSetVisible(GUIEditor_Image[7],false) guiSetVisible(GUIEditor_Image[8],false) showCursor(false) function elIphone() dxDrawImage(516.0,157.0,283.0,442.0,"images/blank-iphone.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end bindKey("B","down",function() guiSetVisible(GUIEditor_Image[1],not guiGetVisible(GUIEditor_Image[1])) guiSetVisible(GUIEditor_Image[2],not guiGetVisible(GUIEditor_Image[2])) guiSetVisible(GUIEditor_Image[3],not guiGetVisible(GUIEditor_Image[3])) guiSetVisible(GUIEditor_Image[4],not guiGetVisible(GUIEditor_Image[4])) guiSetVisible(GUIEditor_Image[5],not guiGetVisible(GUIEditor_Image[5])) guiSetVisible(GUIEditor_Image[6],not guiGetVisible(GUIEditor_Image[6])) guiSetVisible(GUIEditor_Image[7],not guiGetVisible(GUIEditor_Image[7])) guiSetVisible(GUIEditor_Image[8],not guiGetVisible(GUIEditor_Image[8])) showCursor(guiGetVisible(GUIEditor_Image[1])) addEventHandler("onClientRender",root,elIphone) if addEventHandler("onClientRender",root,elIphone) then removeEventHandler("onClientRender",root,elIphone) elseif not addEventHandler("onClientRender",root,elIphone) then addEventHandler("onClientRender",root,elIphone) end end)
-
function spawnIt() if not isPlayerInVehicle(source) then setElementPosition(source, PosX, PosY, PosZ) ---In PosX, PosY and PosZ put ur positions elseif isPlayerInVehicle(source) then removeEventHandler("onPlayerWasted",root,bindear) end end ) function bindear() if source ~= nil then outputChatBox("press "M" to go to the DD arena",source) bindKey(source,"M","down", spawnIt) end end ) addEventHandler("onPlayerWasted",root,bindear) try with it
-
obvio que no te funciono es solo un ejemplo tienes que agregar el onClientGUIClick
-
cl-side function random() local playerName = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) triggerServerEvent("enviarVariable",localPlayer,playerName) end addEvent("enviarVariable",true) addEventHandler("enviarVariable",root,function (playerName) local elPlayer = getPlayerFromName(playerName) local usuario = getAccountName ( getPlayerAccount ( elPlayer ) ) if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) ) then if ( accountName ) then local pname = getPlayerName ( elPlayer ) aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) outputChatBox ( tostring ( pname ) .." agrego a '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) end end end ) prueba con algo asi
-
The gridlist doesnt edit
-
my GirdList doesnt edit with the information in the XML file, 0 problems in debugscript 3 cl-side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(168,37,481,519,"Creator Ped GUI",false) GUIEditor_Edit[1] = guiCreateEdit(28,56,96,26,"",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(28,83,96,26,"",false,GUIEditor_Window[1]) GUIEditor_Edit[3] = guiCreateEdit(28,110,96,26,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(29,138,95,31,"Get Positions",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(141,61,44,18,"set Skin",false,GUIEditor_Window[1]) GUIEditor_Edit[4] = guiCreateEdit(188,53,70,30,"",false,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[4],3) GUIEditor_Label[2] = guiCreateLabel(306,60,70,17,"set Rotation",false,GUIEditor_Window[1]) GUIEditor_Edit[5] = guiCreateEdit(374,53,70,30,"",false,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[5],3) GUIEditor_Label[3] = guiCreateLabel(143,111,80,31,"Name ID",false,GUIEditor_Window[1]) GUIEditor_Edit[6] = guiCreateEdit(141,130,104,28,"",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(16,202,333,308,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) CNameID = guiGridListAddColumn(GUIEditor_Grid[1],"Name ID",0.2) CState = guiGridListAddColumn(GUIEditor_Grid[1],"State",0.2) GUIEditor_Button[2] = guiCreateButton(270,131,91,27,"Create Ped",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(377,131,91,27,"Clear",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(14,174,503,20,"-----------------------------------------------------------------------------------------",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Button[4] = guiCreateButton(357,218,114,31,"Activate Ped",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(357,464,114,31,"Delete Ped",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(357,256,114,31,"Disable Ped",false,GUIEditor_Window[1]) GUIEditor_Label[5] = guiCreateLabel(354,298,115,31,"GUI Made by ElMota (c) 2012",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) addEvent("open:pGUI", true) addEventHandler("open:pGUI",root, function() if guiSetVisible( GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1]) ) then showCursor( guiGetVisible(GUIEditor_Window[1]) ) end end ) addEventHandler("onClientGUIClick",root, function() if source == GUIEditor_Button[3] then local clear1 = guiSetText(GUIEditor_Edit[1],'') local clear2 = guiSetText(GUIEditor_Edit[2],'') local clear3 = guiSetText(GUIEditor_Edit[3],'') local clear4 = guiSetText(GUIEditor_Edit[4],'') local clear5 = guiSetText(GUIEditor_Edit[5],'') local clear6 = guiSetText(GUIEditor_Edit[6],'') if clear1 and clear2 and clear3 and clear4 and clear5 and clear6 then outputChatBox("fields cleared succesfely", getLocalPlayer()) end elseif source == GUIEditor_Button[2] then if guiGetText(GUIEditor_Edit[1]) ~= '' and guiGetText(GUIEditor_Edit[2]) ~= '' and guiGetText(GUIEditor_Edit[3]) ~= '' and guiGetText(GUIEditor_Edit[4]) ~= '' and guiGetText(GUIEditor_Edit[5]) ~= '' and guiGetText(GUIEditor_Edit[6]) ~= '' then triggerServerEvent("get:Fields", localPlayer, guiGetText(GUIEditor_Edit[1]), guiGetText(GUIEditor_Edit[2]), guiGetText(GUIEditor_Edit[3]), guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[5]), guiGetText(GUIEditor_Edit[6])) end elseif source == GUIEditor_Button[1] then local x, y, z = getElementPosition(getLocalPlayer()) guiSetText(GUIEditor_Edit[1], x) guiSetText(GUIEditor_Edit[2], y) guiSetText(GUIEditor_Edit[3], z) end end ) addEvent("get:Values",true) addEventHandler("get:Values", root, function( nameID, state ) if nameID and state then local row = guiGridListAddRow( GUIEditor_Grid[1] ) guiGridListSetItemText(GUIEditor_Grid[1], row, CNameID, nameID, false, false) guiGridListSetItemText(GUIEditor_Grid[1], row, CState, state, false, false) end end ) sv-side addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then bindKey ( thePlayer, "F2", "down", bindear ) else outputChatBox("no eres admin",source) end end end ) function bindear ( thePlayer ) triggerClientEvent ( thePlayer, "open:pGUI", thePlayer ) end addEvent("send:Fields",true) addEvent("get:Fields",true) addEventHandler("get:Fields",root,function( clear1,clear2,clear3,clear4,clear5,clear6 ) if clear1 and clear2 and clear3 and clear4 and clear5 and clear6 then local pedXML = xmlLoadFile(":pedGUI/peds/peds.xml") local pChild = xmlCreateChild(pedXML, "ID") local IDPed = xmlNodeSetAttribute(pChild, "Name", clear6) local skin = xmlNodeSetAttribute(pChild, "skin", clear4) local posX = xmlNodeSetAttribute(pChild, "posX", clear1) local posY = xmlNodeSetAttribute(pChild, "posY", clear2) local posZ = xmlNodeSetAttribute(pChild, "posZ", clear3) local rotation = xmlNodeSetAttribute(pChild, "rotation", clear5) local state = xmlNodeSetAttribute(pChild, "state", inactive) if pChild and IDPed and skin and posX and posY and posZ and rotation then outputChatBox("datos transferidos correctamente", source) xmlSaveFile(pedXML) addEventHandler("send:Fields",root,sendFields) end end end ) function sendFields() local pedXML = xmlLoadFile(":pedGUI/peds/peds.xml") local pChild = xmlFindChild(pedXML,"ID",0) local nameID = xmlNodeGetAttribute(pChild,"Name") local state = xmlNodeGetAttribute(pChild, "state") triggerClientEvent("get:Values", source, nameID, state) end
-
the files in XML was sent, but the gridlist doesnt edit
-
it is the correct GUI Object
-
When I press my Button 2 doesnt create the xml and doesnt edit the XML File doesnt work here the codes cl-side GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(168,37,481,519,"Creator Ped GUI",false) GUIEditor_Edit[1] = guiCreateEdit(28,56,96,26,"",false,GUIEditor_Window[1]) GUIEditor_Edit[2] = guiCreateEdit(28,83,96,26,"",false,GUIEditor_Window[1]) GUIEditor_Edit[3] = guiCreateEdit(28,110,96,26,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(29,138,95,31,"Get Positions",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(141,61,44,18,"set Skin",false,GUIEditor_Window[1]) GUIEditor_Edit[4] = guiCreateEdit(188,53,70,30,"",false,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[4],3) GUIEditor_Label[2] = guiCreateLabel(306,60,70,17,"set Rotation",false,GUIEditor_Window[1]) GUIEditor_Edit[5] = guiCreateEdit(374,53,70,30,"",false,GUIEditor_Window[1]) guiEditSetMaxLength(GUIEditor_Edit[5],3) GUIEditor_Label[3] = guiCreateLabel(143,111,80,31,"Name ID",false,GUIEditor_Window[1]) GUIEditor_Edit[6] = guiCreateEdit(141,130,104,28,"",false,GUIEditor_Window[1]) GUIEditor_Grid[1] = guiCreateGridList(16,202,333,308,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) CNameID = guiGridListAddColumn(GUIEditor_Grid[1],"Name ID",0.2) CState = guiGridListAddColumn(GUIEditor_Grid[1],"State",0.2) GUIEditor_Button[2] = guiCreateButton(270,131,91,27,"Create Ped",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(377,131,91,27,"Clear",false,GUIEditor_Window[1]) GUIEditor_Label[4] = guiCreateLabel(14,174,503,20,"-----------------------------------------------------------------------------------------",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[4],"clear-normal") GUIEditor_Button[4] = guiCreateButton(357,218,114,31,"Activate Ped",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(357,464,114,31,"Delete Ped",false,GUIEditor_Window[1]) GUIEditor_Button[6] = guiCreateButton(357,256,114,31,"Disable Ped",false,GUIEditor_Window[1]) GUIEditor_Label[5] = guiCreateLabel(354,298,115,31,"GUI Made by ElMota (c) 2012",false,GUIEditor_Window[1]) guiSetVisible(GUIEditor_Window[1], false) showCursor(false) addEvent("open:pGUI", true) addEventHandler("open:pGUI",root,function() if guiSetVisible( GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1]) ) then showCursor( guiGetVisible(GUIEditor_Window[1]) ) end end ) addEventHandler("onClientGUIClick",root, function() if source == GUIEditor_Button[3] then local clear1 = guiSetText(GUIEditor_Edit[1],'') local clear2 = guiSetText(GUIEditor_Edit[2],'') local clear3 = guiSetText(GUIEditor_Edit[3],'') local clear4 = guiSetText(GUIEditor_Edit[4],'') local clear5 = guiSetText(GUIEditor_Edit[5],'') local clear6 = guiSetText(GUIEditor_Edit[6],'') if clear1 and clear2 and clear3 and clear4 and clear5 and clear6 then outputChatBox("fields cleared succesfely", getLocalPlayer()) end elseif source == GUIEditor_Button[2] then if guiGetText(GUIEditor_Edit[1]) ~= '' and guiGetText(GUIEditor_Edit[2]) ~= '' and guiGetText(GUIEditor_Edit[3]) ~= '' and guiGetText(GUIEditor_Edit[4]) and guiGetText(GUIEditor_Edit[5]) ~= '' and guiGetText(GUIEditor_Edit[6]) ~= '' then triggerServerEvent("get:Fields", localPlayer, clear1, clear2, clear3, clear4, clear5, clear6, clear7) end elseif source == GUIEditor_Button[1] then local x, y, z = getElementPosition(getLocalPlayer()) guiSetText(GUIEditor_Edit[1], x) guiSetText(GUIEditor_Edit[2], y) guiSetText(GUIEditor_Edit[3], z) end end ) addEvent("get:Values",true) addEventHandler("get:Values", root, function( nameID, state ) if nameID and state then local row = guiGridListAddRow( GUIEditor_Grid[1] ) guiGridListSetItemText(GUIEditor_Grid[1], row, CNameID, nameID, false, false) guiGridListSetItemText(GUIEditor_Grid[1], row, CState, state, false, false) end end ) sv-side addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index, thePlayer in ipairs ( getElementsByType ( "player" ) ) do local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then bindKey ( thePlayer, "F2", "down", bindear ) else outputChatBox("no eres admin",source) end end end ) function bindear ( thePlayer ) triggerClientEvent ( thePlayer, "open:pGUI", thePlayer ) end addEvent("send:Fields",true) addEvent("get:Fields",true) addEventHandler("get:Fields",root,function( clear1,clear2,clear3,clear4,clear5,clear6 ) if clear1 and clear2 and clear3 and clear4 and clear5 and clear6 then local pedXML = xmlLoadFile(":pedGUI/peds/peds.xml") local pChild = xmlCreateChild(pedXML, "ID") local IDPed = xmlNodeSetAttribute(pChild, "Name", clear6) local skin = xmlNodeSetAttribute(pChild, "skin", clear4) local posX = xmlNodeSetAttribute(pChild, "posX", clear1) local posY = xmlNodeSetAttribute(pChild, "posY", clear2) local posZ = xmlNodeSetAttribute(pChild, "posZ", clear3) local rotation = xmlNodeSetAttribute(pChild, "rotation", clear5) local state = xmlNodeSetAttribute(pChild, "state", inactive) if pChild and IDPed and skin and posX and posY and posZ and rotation then outputChatBox("datos transferidos correctamente", source) xmlSaveFile(pedXML) addEventHandler("send:Fields",root,sendFields) end end end ) function sendFields() local pedXML = xmlLoadFile(":pedGUI/peds/peds.xml") local pChild = xmlFindChild(pedXML,"ID",0) local nameID = xmlNodeGetAttribute(pChild,"Name") local state = xmlNodeGetAttribute(pChild, "state") triggerClientEvent("get:Values", source, nameID, state) end 0 problems in debugscript 3
-
le pusiste en el meta.xml lo de export function ?
-
bueno amigos, quiero cambiar el bindKey del GUIEditor, debido a que mi boton derecho del mouse no esta funcionando, he encontrado esto en uno de sus archivos lua, peor nose cual debo cambiar porfavor ayudenme addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),function() bindKey("lshift","down",function () loose_manipulation = true end) bindKey("lshift","up",function () loose_manipulation = false end) bindKey("rshift","down",function () loose_manipulation = true end) bindKey("rshift","up",function () loose_manipulation = false end) end)
-
prueba con esto, y reemplaza el tiempo por los milisegundos que quieres para que se les entregue el dinero setTimer(function() local isPlayerInFaction = exports.factions:isPlayerInFaction if isPlayerInFaction(source, 1) then givePlayerMoney(source, AQUIELDINEROQUEQUIERESDARLE) end end, elTIEMPO, 0)
-
setTimer(function() local isPlayerInFaction = exports.factions:isPlayerInFaction if isPlayerInFaction(source, 1) then givePlayerMoney(source, AQUIELDINEROQUEQUIERESDARLE) end end, elTIEMPO, 0) eso ?
-
setTimer(function() givePlayerMoney(getRootElement, AQUIELDINEROQUEQUIERESDARLE) end, elTIEMPO, 0) algo asi
-
podrian ponerme otro mirror para el qt to lua , ya que el GUIEditor no me sirve porque mi boton derecho no sirve u.u, gracias de antemano
-
es facil hacer un payday, con un setTimer y un givePlayerMoney
-
Juako lee que argumentos van en las 2 funciones en la wiki
-
attemp to concatenate global 'accName' ( a nil value )
-
bad argument lines 2 and 3 server-side here the code : server-side addEventHandler("onResourceStart", resourceRoot, function() local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then for todos, online in ipairs(getElementsByType) do bindKey(online,"F2","down",bindear) end end end ) function bindear() triggerClientEvent(source, "open:pGUI", source) end client-side pedGUI = guiCreateWindow(290,102,773,586,"Creator Ped GUI",false) guiSetVisible(pedGUI, false) showCursor(false) addEvent("open:pGUI", true) addEventHandler("open:pGUI",root,function() if guiGetVisible(pedGUI) == true and showCursor == true then guiSetVisible(pedGUI,false) showCursor(false) elseif guiGetVisible(pedGUI) == false and showCursor == false then guiSetVisible(pedGUI,true) showCursor(true) end end )
-
and after how I will can create a Window ?
-
#OFFTOPIC : I need download it ?