Jump to content

CheiN

Members
  • Posts

    164
  • Joined

  • Last visited

Posts posted by CheiN

  1. so im trying to open mta and whenever i want to join a server i cant with error cc23 (I ALREADY KNOW THAT IS INTERNET PROBLEMS BUT ACTUALLY IM NOT HAVING PROBLEMS WITH IT) so, i reinstalled mta and still cant join any server, mainly the problem is this: i join server browser and i type the server where i want to join and it shows up the name, the amount of players in there and it DOESNT show up my ping, already reconnected my internet and also restarted my pc. i've done everything to make this work and it just isn't working so... help me out with this :~

  2. Hello, i made this script and i don't know why this doesn't detach passed 2 seconds could some one help me correcting me?

    gMe = getLocalPlayer() 
    function gravity() 
    marker1 = createMarker (6009, 392, 10.800000190735, "corona", 2, 0, 0, 0, 0) 
    object = createObject (1681, 6009.2998046875, 396.39999389648, 16.10000038147) 
    end 
    function MarkerHit ( hitPlayer, matchingDimension ) 
    vehicle = getPedOccupiedVehicle ( hitPlayer ) 
    if hitPlayer ~= gMe then 
     return  
    end 
    if source == marker1 then 
    attachElements (vehicle, object, 0, 0, -5.5, 0, 0, 0) 
    setTimer(function () 
                            detachElements (object)      
                        end,2000,1) 
    moveObject (object, 2000, 6009.2998046875, 490, 16.10000038147) 
    end 
    end 
    addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), gravity ) 
    addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHit ) 
    

  3. hello guys today i was fixing a race-panel and i wanted fix the buymap part but i dont know what is wrong i tryied to do all i could but now i have not idea about what is happening with this script.

    function buyMap(thePlayer,mapName) 
        if mapIsAlreadySet == false then 
            if not (mapName == "") then 
                local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) 
                if playerCash >= mapCost then 
                    exports.race:setNextMap( mapName ) 
                    executeCommandHandler("pnfnsdhasd3w7432jhdsbw3ersdncsdir",thePlayer,mapName) 
                    savePlayerData(thePlayer,"cash",playerCash-mapCost) 
                    outputChatBox("#00BFFF# Nextmap: "..getPlayerName(thePlayer).."#FFFFFF has bought a next map!",getRootElement(),255,255,255,true) 
                    outputChatBox("#00BFFF# Nextmap: #FFFFFF"..mapName,getRootElement(),255,255,255,true) 
                    mapIsAlreadySet = thePlayer 
                    local oldmapbuys = loadPlayerData(thePlayer,"mapBuys") 
                    savePlayerData(thePlayer,"mapBuys", oldmapbuys + 1) 
                    CheckAchievement(thePlayer,13) 
                    scoreboardRefresh(thePlayer) 
                else 
                    outputChatBox("#00BFFF# #FFFFFFYou don't have enough money to set a map!",thePlayer,255,255,255,true) 
                end 
            else 
                outputChatBox("#00BFFF# #FFFFFFPlease select a map from the list first!",thePlayer,255,255,255,true) 
            end 
        else 
            outputChatBox("#00BFFF# #FFFFFFA map is already set at the moment! Please try again later.",thePlayer,255,255,255,true) 
        end 
    end 
      
    function unbuyMap(thePlayer) 
        if mapIsAlreadySet ~= false then 
                if mapIsAlreadySet == thePlayer then 
                    executeCommandHandler("pnfnsdhasd3w7432jhdsbw3ersdncsdir",thePlayer,nil) 
                    local playerCash = tonumber(loadPlayerData(thePlayer,"cash")) 
                    savePlayerData(thePlayer,"cash",playerCash+(mapCost/4)*3) 
                    outputChatBox("#00BFFF# Nextmap: "..getPlayerName(thePlayer).."#FFFFFF has unbought a next map!",getRootElement(),255,255,255,true) 
                    mapIsAlreadySet = false 
                    local oldmapbuys = loadPlayerData(thePlayer,"mapBuys") 
                    savePlayerData(thePlayer,"mapBuys", oldmapbuys - 1) 
                    CheckAchievement(thePlayer,13) 
                    scoreboardRefresh(thePlayer) 
                else 
                    outputChatBox("#00BFFF# #FFFFFFYou didn't buy that map!",thePlayer,255,255,255,true) 
                end 
        else 
            outputChatBox("#00BFFF# #FFFFFFNo map has been bought!",thePlayer,255,255,255,true) 
        end 
    end 
      
    function resetMapSetStatus() 
        mapIsAlreadySet = false 
    end 
    addEventHandler("onMapStarting",getRootElement(),resetMapSetStatus) 
    

    thanks for reading.

  4.     exports.scoreboard:scoreboardAddColumn( "Top Times") 
        function someoneReachedHunter(number, sort, model) 
            if sort == "vehiclechange" and model == 425 then 
            top = getElementData(source,"Top Times") or 0 
                setElementData(source,"Top Times",top+1) 
            end 
        end 
        addEvent("onPlayerPickUpRacePickup",true) 
        addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter) 
      
      
    function saverhere () 
        local account = getPlayerAccount( source ) 
          if ( account ) and not isGuestAccount ( account ) then 
                local toptimes1 = getElementData ( source, "Top Times" )  
              if ( account ) then 
                   setAccountData ( account, "toptimes.top", toptimes1 ) 
              end 
          end 
    end 
      
    function loger ( account ) 
       if ( account ) then 
            local toptimes = getAccountData ( account, "toptimes.top" ) 
            if ( toptimes ) then 
                 setElementData ( source, "toptimes.top", toptimes ) 
            end 
       end 
    end 
      
    addEventHandler ( "onPlayerQuit", getRootElement( ), saverhere ) 
    addEventHandler ( "onPlayerLogin", getRootElement ( ), loger ) 
    

    (i made this toptimes on scoreboard so im not stolling rights.)

    can some one help me or explain me why this is not working?

  5. Client:

    GUIEditor = { 
      
        button = {}, 
      
        window = {}, 
      
    } 
      
      
    addEventHandler("onClientResourceStart", resourceRoot, 
      
        function() 
      
            GUIEditor.window[1] = guiCreateWindow(152, 118, 501, 412, "-|SiG|- User Panel", false) 
            guiWindowSetSizable(GUIEditor.window[1], false) 
      
            guiSetAlpha(GUIEditor.window[1], 1.00) 
      
      
            modlord = guiCreateButton(36, 99, 80, 54, "Infernus-mod", false, GUIEditor.window[1]) 
      
            guiSetFont(modlord, "default-bold-small") 
      
            wheelsabe = guiCreateButton(36, 259, 80, 54, "Wheels", false, GUIEditor.window[1]) 
      
            guiSetFont(wheelsabe, "default-bold-small") 
      
            GUIEditor.button[10] = guiCreateButton(370, 259, 80, 54, "Black 'N' White", false, GUIEditor.window[1]) 
            shaderwater = guiCreateButton(207, 259, 80, 54, "Water Shader", false, GUIEditor.window[1]) 
      
            guiSetFont(shaderwater, "default-bold-small") 
      
      
            Carcolor1 = guiCreateButton(207, 100, 80, 54, "Green Car Color", false, GUIEditor.window[1]) 
      
            guiSetFont(Carcolor1, "default-bold-small") 
      
            GUIEditor.button[14] = guiCreateButton(370, 101, 80, 54, "Party mode", false, GUIEditor.window[1]) 
            guiSetFont(GUIEditor.button[14], "default-bold-small") 
         
        end 
    ) 
      
      
    bindKey ( "U", "down", 
        function ( ) 
            state = ( not state ) 
            removeEventHandler ( "onClientRender", root, draw ) 
            guiSetVisible ( GUIEditor.window[1], state ) 
            showCursor (false) 
            if ( state ) then 
                addEventHandler ( "onClientRender", root) 
            end 
        end 
    ) 
      
      
      
    function onGuiClick (button, state, absoluteX, absoluteY) 
      if (source == Infernus-mod) then 
        triggerServerEvent ("domo", getLocalPlayer()) 
     end 
    end 
    addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
    

    server:

      
    addEvent("domo", true) 
    addEventHandler("domo", rootElement, 
      function() 
        if isPedInVehicle(source) then 
          if ( getPlayerMoney (source) >= 7000 ) then 
            takePlayerMoney(source, 7000) 
        engineLoadTXD ( "infernus.txd", 411 ) 
        engineImportTXD ( txd, 411 ) 
        dff = engineLoadDFF ( "infernus.dff", 411 ) 
        engineReplaceModel ( dff, 411 ) 
            outputChatBox("Infernus Successfully changed", source, 255, 255, 0, true) 
          else 
            outputChatBox("Not enough money 7000.", source, 255, 0, 0, true) 
          end      
        else 
          outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) 
        end 
      end 
    ) 
    

    Problems:

    attemp to perform arithmetic on global 'infernus'

    that happend when i click all the buttons

    Help plz

  6. ._. i want bind this but im new using GUI

    GUIEditor = { 
      
        button = {}, 
      
    } 
      
    GUIEditor.button[1] = guiCreateButton(234, 242, 94, 50, "Infernus Mod", false) 
      
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF29D59A") 
      
      
      
    GUIEditor.button[2] = guiCreateButton(472, 242, 94, 50, "wheels", false) 
      
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
      
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF29D59A") 
      
      
    addEventHandler("onClientRender", root, 
      
        function() 
      
            dxDrawImage(433, 110, 172, 122, ":guieditor/images/weel.png", 0, 0, 0, tocolor(206, 148, 47, 255), true) 
            dxDrawImage(191, 110, 180, 122, ":guieditor/images/infernus.png", 0, 0, 0, tocolor(82, 171, 80, 255), true) 
        end 
    ) 
      
    

  7. i dont know why this doesnt work ._.

      
    GUIEditor = { 
        button = {}, 
      
    } 
    GUIEditor.button[1] = guiCreateButton(234, 242, 94, 50, "Infernus Mod", false) 
    guiSetFont(GUIEditor.button[1], "default-bold-small") 
    guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF29D59A") 
      
    GUIEditor.button[2] = guiCreateButton(472, 242, 94, 50, "wheels", false) 
    guiSetFont(GUIEditor.button[2], "default-bold-small") 
      
    guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF29D59A") 
      
    bindKey ( "u", "down", ( GUIEditor.button[1], GUIEditor.button[2], 
     dxDrawImage(433, 110, 172, 122, ":images/weel.png", 0, 0, 0, tocolor(206, 148, 47, 255), true),  
    dxDrawImage(191, 110, 180, 122, ":images/infernus.png", 0, 0, 0, tocolor(82, 171, 80, 255), true) ) 
     end  
    ) 
      
    

    can someone help me?

  8. Hola guys, this is the sh*t, i was making a script but making it i was confused with the setElementVelocity, can someone correct me?

      
    local x,y,z = getElementPosition (theVehicle) 
    local ocup = getOcuppedVehicle (thePlayer) 
    local marker1  = createMarker ( x,y,z, xr,yr,zr, "corona", 2.2, 255, 0, 123, 120 ) 
    local xr,yr,zr = getElementRotation 
    function MarkerHit( hitElement, matchingDimension ) 
      local elementType = getElementType( hitElement )  
       blowVehicle (theVehicle) 
      speedx, speedy, speedz = getElementVelocity (marker1) 
    setElementVelocity ( marker1, speedx, speedy + 4, speedz) 
    end 
    bindKey ("rctrl","down", leshot) 
    addEventHandler ("onMarkerHit", marker1, MarkerHit) 
    

    Like germans says: Danke!!!!

  9.   
    local screenWidth, screenHeight = getScreenSize ( ) 
      
    function copter (killer) 
    local killer = getPlayerName 
       dxDrawText ( helid, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" )  
    end 
    addEventHandler ("onClientPlayerHeliKilled", getRootElement(), copter) 
    

  10. i script when im on my DS.. so, dont jusge. before think, and that not help (i study so much for that reason i cant test...)

    and multi lingual are, "friendly" not rude

    THX DUDE ^^

  11. Hey buddies ok i need a favor.

    I want learn how to make a bind that active a shader, if u press 1 time that shader will be enabled and if u Press it agaij it will be disables, so, can someone explain me how to make this? I know that is using bindKey and dxCreateShader but WHICH STATE I SHOULD USE?

×
×
  • Create New...