Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by Stevenn

  1. hey i need help with sqlite because i have never used it before and i can't get the examples on the wiki :S

    can somebody give me an example on how to save interior in sqlite?

  2. 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, 
        if source == mybutton then 
         setVariable(mybutton, thenewVariable) 

    Do you know what I mean? :D :D

  3. This exports functions from this resource, so other resources can use them with call

    function: The function name

    type Whether function is exported server-side or client-side (valid values are: "server" and "client")

    http: Can the function be called via HTTP (true/false)

    Ok, so I added

    to the meta and then

    exports ["testResource"] : randomTest("test") 

    but no result :(

  4. Hello, I have this script:


    function randomTest(text) 
        guiSetText (myLabel, text) 
    addEvent("randomTest", true) 
    addEventHandler("randomTest", root, randomTest) 


    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??" ) 

  5. 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!!

  6. hello, how can i set the text server sided? I tried this but it did not work!:

    function randomTest(text) 
        guiSetText (myLabel, text) 
    addEvent("randomTest", true) 
    addEventHandler("randomTest", root, randomTest) 

    and server:

    triggerClientEvent(source,"randomTest", root, "the text") 

  7. Hello.

    I tried this, but did not work:

    local texts = { 
    [[ Title 
    First Text 
    [[ Title 
    Second text 
    local randomText = math.random ( texts[index][2], texts[index][4] ) 
    function setRandomtext () 
       guiSetText ( memo, randomText ) 
    setTimer ( setRandomtext, 60000, 1 ) -- the text should be updated every 60000 milli-seconds.  

  8. 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) 
    addEventHandler ( "onClientRender", root, staffTag )   

    what is wrong?

  9. I'm sorry for hi-jacking the topic but I seem to have a problem with my stats.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/>'; 


    Parse error: syntax error, unexpected $end in /home/a6564823/public_html/php/stats.php on line 35
  10. 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? :)

  11. thank you, but how can I do this:

    addEvent ( "respawn:allsaints", true ) 
    function allsaints () 
    addEventHandler ( "respawn:allsaints", root, allsaints ) 

  12. 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 ) ) 
    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 )

  13. 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"

  14. 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!" ) 

  • Create New...