Jump to content

Stevenn

Members
  • Posts

    97
  • Joined

  • Last visited

Everything posted by Stevenn

  1. Stevenn

    sqlite

    hey i need help with sqlite because i have never used it before and i can't get the examples on the wiki can somebody give me an example on how to save interior in sqlite?
  2. because i have a gui window and i need to use it more than once without recreating it
  3. hey how can I rename a variable? like i have this: mywindow = guiCreateWindow( 100, 100, 100, 100, "lol", false) mylabel = guiCreateLabel(100, 100, 100, 100, "text", mywindow, false) mybutton = guiCreateButton(100, 100, 100, 100, "lol", mywindow, false) addEventHandler("onClientGUIClick", resoucreRoot, function() if source == mybutton then setVariable(mybutton, thenewVariable) end end) Do you know what I mean? :D
  4. nevermind i got it to work
  5. I know, it is a client script
  6. Ok, so I added to the meta and then exports ["testResource"] : randomTest("test") but no result
  7. Hello, I have this script: Client: function randomTest(text) guiSetText (myLabel, text) end addEvent("randomTest", true) addEventHandler("randomTest", root, randomTest) Client: triggerClientEvent(source,"randomTest", root, "the text") But how can I make it a exported function? So I could use something like: exports["setText"] : randomTest ( "my text??" ) -- server exports["setText"] : randomTest ( source, "my text??" )
  8. hi, how can i make a vehicle spawner like first a table with which team who is allowed to use it, then the vehicle id(s) and marker position. Like CIT's! Please give me the events/functions. Thanks!!
  9. Woah, double mistake the code worked nevermind
  10. Yea it did work, I had wrong gui element my misstake.
  11. hello, how can i set the text server sided? I tried this but it did not work!: function randomTest(text) guiSetText (myLabel, text) end addEvent("randomTest", true) addEventHandler("randomTest", root, randomTest) and server: triggerClientEvent(source,"randomTest", root, "the text")
  12. Hello. I tried this, but did not work: local texts = { {"firstText", [[ Title First Text ]] }, {"secondText", [[ Title Second text ]] }, } local randomText = math.random ( texts[index][2], texts[index][4] ) function setRandomtext () guiSetText ( memo, randomText ) end setTimer ( setRandomtext, 60000, 1 ) -- the text should be updated every 60000 milli-seconds.
  13. Stevenn

    staff tag

    i tried to make a staff tag script but it doesn't work.. function staffTag() local maxrange = 123 scx,scy = getScreenFromWorldPosition (x,y,z) local x, y, z = getElementPosition ( localPlayer ) local camX,camY,camZ = getCameraMatrix() if scx and scy and getDistanceBetweenPoints3D(camX,camY,camZ,x,y,z+5) <= maxrange then dxDrawText("Staff",x, y, z,tocolor(255,255,255,255),1.0,"bankgothic","left","top",false,false,false) end end addEventHandler ( "onClientRender", root, staffTag ) what is wrong?
  14. I'm sorry for hi-jacking the topic but I seem to have a problem with my stats.php <?php require_once ('GameQ/GameQ.php'); //class $server['mtasa'] = array ('mtasa', 'serverIP', 22003+123); //ip & port $query = new GameQ; $query -> addServers ($server); $data = $query->requestData(); foreach ($server AS $server_id => $values) { $info = $data[$server_id]; if (!$info["servername"]) { echo 'Server offline'; } else { echo "Server name: "; echo $info["servername"]; echo '<br/>'; echo "Gamemode: "; echo $info["gametype"]; echo '<br/>'; echo "Map: "; echo $info["map"]; echo '<br/>'; echo "Players: "; echo $info["num_players"] ."/". $info["max_players"]; echo '<br/>'; if ($info["password"] == '0') { $pw = "No"; } else { $pw = "Yes"; } echo "Password: "; echo $pw; echo '<br/><br/>'; } ?> result:
  15. Stevenn

    fade dxtext

    Hello, I got this dxmsg which disappears in 5 seconds, but I want it to fade out not just remove it instantly, if you get what I mean and my question is, how can I do that?
  16. Social, i did exactly what u wrote, it did not work. but karth's code works thanks!
  17. bad arguement @ destroyElement
  18. thanks it works, but how can I destroy it after 5 seconds? setTimer ( destroyElement, 5000, 1, localPlayer, drawTheText ) does not work
  19. thank you, but how can I do this: addEvent ( "respawn:allsaints", true ) function allsaints () dxDrawText("Hello",454.0,425.0,886.0,581.0,tocolor(255,255,255,255),2.0,"pricedown","left","top",false,false,false) end addEventHandler ( "respawn:allsaints", root, allsaints )
  20. Hello, i got a problem with setCameraMatrix. function respawn ( totalammo, killer, killwerweapon, bodypart, stealth ) setTimer ( setCameraMatrix, 1000, 1, source, 1187, -1324, 14 ) fadeCamera ( source, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1500, 1, source, true ) setTimer ( spawnPlayer, 5000, 1, source, 1179, -1325, 15, getElementModel ( source ) ) end addEventHandler ( "onPlayerWasted", root, respawn ) the camera view never changes, it should cancel the cameramatrix and let me play as usual after 5 seconds ( 5000 milliseconds )
  21. "bad argument, expected gui element at argument 1, got 0 "
  22. No, I have created several rows in my gridlist. Let's say I have two rows, one with the name "Cookie" and another one with "Cereal" and if I click on the Cookie row it will output "Hello" but if I click on the "Cereal" item it will say "Bulldog"
  23. Hello, I dont know hoow i can use the guiGridListGetSelectedItem.. I have tried: rGrid = guiCreateGridList(10,30,165,413,false,guiWindow) myGridGrid = guiGridListSetItemText(rGrid,0,1,"Trucker", false, false) addEventHandler ( "onClientGUIClick", guiRoot, function ( button ) local theGUI = guiGridListGetSelectedItem ( rGrid ) if ( theGUI == myGridGrid ) then outputChatBox ( "Hey!" ) end end )
×
×
  • Create New...