-
Posts
378 -
Joined
-
Last visited
Everything posted by BriGhtx3
-
TO CREATE A FILE : xmlFile= xmlCreateFile ( "YOURXML.xml", "root" ) -- Create the xml file xmlHouses = xmlCreateChild ( xmlFile, "house") -- CREATE THE TAG xmlNodeSetAttribute(xmlHouses,"markerPosX", "VALUE1") -- CREATE THE MARKERPOSX PART xmlNodeSetAttribute(xmlHouses,"markerPosY", "VALUE2") -- SAME WITH Y xmlNodeSetAttribute(xmlHouses,"markerPosZ", "VALUE3") -- SAME WITH Z xmlNodeSetAttribute(xmlHouses,"owner", "VALUE4") -- SAME WITH OWNER TO GET THE X,Y,Z, OWNER : posX = xmlNodeGetAttribute(xmlFile, "markerPosX") posY = xmlNodeGetAttribute(xmlFile, "markerPosY") posZ = xmlNodeGetAttribute(xmlFile, "markerPosZ") owner = xmlNodeGetAttribute(xmlFile, "owner") outputChatBox("X : "..posX.." Y : "..posY.." Z : "..posZ.." Owner : "..owner)
-
function initGUI( ) -- Create our button btnOutput = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) -- And attach our button to the outputEditBox function addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false ) -- Create an edit box and define it as "editBox". editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, "Type your message here!", true ) guiEditSetMaxLength ( editBox, 128 ) -- The max chatbox text length is 128, so force this end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) -- Setup our function to output the message to the chatbox function outputEditBox ( button ) if button == "left" then local text = guiGetText ( editBox )-- Get the text from the edit box outputChatBox ( text ) -- Output that text end end this is from the wiki
-
Oh now I understand this. So I have to destroy it and create it again?
-
How do you mean this?
-
UAepro very nice Code. But you can't use guiSetText with it oO
-
got it : I triggered it wrong triggerClientEvent("getTextClient",source,tostring(thetext))
-
Already tried this. Doesn't work
-
function getthesite(textaa) sitetext = tostring(textaa) --guiSetVisible(Laptop_LBLPhish,true) -- guiSetText(Laptop_LBLPhish,sitetext) removeEventHandler("onClientRender",getRootElement(),drawsitetext) addEventHandler("onClientRender",getRootElement(),drawsitetext) end addEvent("getTextClient",true) addEventHandler("getTextClient",getRootElement(),getthesite) function drawsitetext() dxDrawColoredText(sitetext, 200, 250, 900, 900, tocolor(255,255,255,255),0.7,"bankgothic") end This is my code, if you want the function dxDrawColoredText : my problem is, it is visible for all players. but it should be just visible for me oO
-
Lol I knew that but it is very difficult to create 100 labels -.- And the users add the texts via color codes.
-
Quantum thats wrong. Its easier to use xampp cause you don't have to configurate anything. Youre right Navicat is good for navigating.
-
I know there is no way to use color codes in labels. But i want to set colors for different texts. I know I can use dxtext but is there no other way? Like creating a display or something like this for a GUI? Ill freak out when someone says you cant use color codes in labels -.-
-
Okay, got it, but now it first puts out "---" and by the second time the real text :edit got it
-
Yes but i don't know how to output the text clientside. It still just returns true and not the text.
-
You can create the script yourself
-
giovanna = createPed(258, 2135.662109375, -1739.5107421875, 17.281345367432) setElementInterior(giovanna, 0) setElementDimension(giovanna, 0) setPedRotation(giovanna, 87) setTimer(setPedAnimation ,1000,1,giovanna, "INT_OFFICE", "OFF_Sit_Idle_Loop", -1, false, false, false )
-
Why dont you attach it to the ped?
-
New thing : --Clientside thesitetext = tostring(triggerServerEvent("getText",getLocalPlayer(),url)) --ServerSide function getSiteText(site) local thetext = tostring(MySQL_GetString("web", "Text", "Site='"..site.."'")) return thetext end addEvent("getText",true) addEventHandler("getText",getRootElement(),getSiteText) Why does it return true? But when I output it serverside it outputs the text ?
-
Miki i would not have asked if i didn't know that -.- Maurize thats not what i asked
-
Is there a way to set the data for a string like Boom? For example : setElementData("boom","dog","cow")
-
function checkAttachedElement(player) local veh = getPedOccupiedVehicle(player) if veh then if getElementModel(veh) == 515 then if isElementAttached(veh) then local attachedElement = getElementAttachedTo(veh) if getElementType(attachedElement) == "vehicle" then outputChatBox(tostring(getElementModel(attachedElement)) end end end end end addCommandHandler("check",checkAttachedElement)