Jump to content

CowTurbo

Members
  • Posts

    385
  • Joined

  • Last visited

Posts posted by CowTurbo

  1. this isnt working right. it changes it pos, but not where the arrow is, at end, it dont come end, and at start, he dont come start, he's moving a bit at center.

    So, i tryed to change maths, but, useless, im not good at maths, some help will be good with that =)

    Thx

  2. Hello, i wanted to ask that how to make this -> You got progress bar, and when you click on it, and move arrow left, then the progress goes to this position where the arrow is selected on progress.

    No script is needed what i have done i think,

  3. function main() 
    medicblip = createBlip ( 2036, -1408, 17, 22, 0, 0, 0, 255 ) 
    medicpickup = createPickup (2036, -1408, 17, 3, 1277, 100) 
    end 
    addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), main) -- why is here displayLoadedRes, in ur script is no such function.  
      
    addEventHandler ("onPickupUse", getRootElement(),  
    function (playerWhoUses) 
      if (source == medicpickup) then 
        giveWeapon (playerWhoUses, 14, 1, true) 
        setElementData (playerWhoUses, "job", "medic") 
      else 
      end 
    end) 
      
    addEventHandler ("onPlayerDamage", getRootElement(),  
    function(attacker, weapon, bodypart, loss) 
      if (weapon == 15) and getElementData ( attacker, "job" == "medic" )then 
          setElementHealth ( targetPlayer, getElementHealth(targetPlayer) + 10 ) 
          givePlayerMoney ( attacker, 450 ) 
          cancelEvent() 
      else 
     end 
    end  
    

  4. Son, wanna get perfect girl ?

    Yea dad

    Go buy a barbie girl

    Ok dad, how big

    With XXL Boobies

    Roger that, wanna one by u too ?

    Yeah, with small nippels

    ARE U HOMO!?

    No, im homo, with small leters, i am not so advanced yet.

    Negative

    What the hell are you talking about ?

    Just, how have i made then? If you are homo, then you cant be my dad.

    I can, your mom isnt ur mom,

    Damn daddy! I comed from Penis?! Amazing, how small i was

    Smaller than mines digi digi ting, behinde the two legs.

  5. Are you stupid? Do you think someone script for you gamemode for admin rank? It's a lot of work and I don't think anybody do that -,- learn lua yourself or pay for scripts =] I don't see another way.

    Game modes are simple for me :|

    Show me ur modes xD

  6. I think the easyest way for doing that is seting accountData.

    When player boughts car, then set he's account data to that vehicle what he did bought. So, if you wanna do that with different buttons..

      
    -- For buying car 
    function buyCar1 ( carName,price ) 
        local playerAccount = getPlayerAccount ( source ) 
            local car1 = getAccountData ( playerAccount, "Car1" )  
            if not( car1 ) then 
                if ( getPlayerMoney => price ) then 
                    setAccountData ( playerAccount, "Car1", carName )  -- For model, you can do getVehicleModelFromName function,  
                    setAccountData ( playerAccount, "Car1Price", price ) -- We can give him money back when he sell easyly 
                    takePlayerMoney ( source, price ) 
                    outputChatBox ( "Gratz! You have boughted "..carName.."! Price: "..price, source, 255, 0, 255 ) 
                else 
                    outputChatBox ( "* ERROR: You dont have so much money! Needed: "..price.."!", source, 255,0,0 ) 
                end 
            else 
                triggerClientEvent ( source, "showErrorOnCar1Buy", source )  --  > This will show you error, something like "Are you sure you wanan buy that car? You already have a car on that slot" ... 
            end 
    end 
    addEvent ( "buyCar1", true ) 
    addEventHandler ( "buyCar1", getRootElement(), buyCar1 ) 
      
    -- For selling car 
      
    function sellCar1 ( ) 
        local playerAccount = getPlayerAccount ( source ) 
            local car1 = getAccountData ( playerAccount, "Car1" )  
            if ( car1 ) then 
                setAccountData ( playerAccount, "Car1", nil )   
                local price = getAccountData ( playerAccount, "Car1Price" ) 
                outputChatBox ( "Gratz! You have sold "..car1.."! Obtained: "..price/2, source, 255, 0, 255 )  
                givePlayerMoney ( source, price/2 ) 
            else 
                triggerClientEvent ( source, "showErrorOnCar1Sell", source )  --  > This will show you error, when you sell car, like "Are you sure ?" .. 
            end 
    end 
    addEvent ( "sellCar1", true ) 
    addEventHandler ( "sellCar1", getRootElement(), sellCar1 ) 
      
    

  7. function onJoin () 
      if not( timerValue == true )then 
      timerValue = true  
      getTimerValue () 
    end 
    addEventHandler ( "onPlayerJoin", getRootElement(), onJoin ) 
      
    function getTimerValue () 
      if ( timerValue == true ) then 
      triggerClientEvent ( getRootElement(), "showDX", getRootElement() ) 
      setTimer ( setValue, 30000,1 ) 
      elseif (timerValue == false) then 
      triggerClientEvent ( getRootElement(), "hideDX", getRootElement() ) 
      end 
    end 
      
    function setValue () 
      timerValue = false  
      getTimerValue () 
    end 
      
    function onStart () 
      setTimer ( getTimerValuea(), 50,0) 
    end 
    addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onStart ) 
      
      
    

    function showDX () 
      addEventHandler ( "onClientRender", getRootElement(), drawDX ) 
    end 
    addEvent ( "showDX", true ) 
    addEventHandler ( "showDX", getRootElement(), showDX ) 
      
    function drawDX () 
                 
            X,Y = guiGetScreenSize () 
            X = X * (2.5/3) 
            Y = Y * (1/4) 
            dxDrawText ( segundos, X, Y, X, Y, tocolor(255, 255, 255, 255), 5) 
             
    end 
      
    function hideDX () 
      removeEventHandler ( "onClientRender", getRootElement(), drawDX ) 
    end 
    addEvent ( "hideDX ", true ) 
    addEventHandler ( "hideDX ", getRootElement(), hideDX ) 
      
      
      
    

    Client side timers will not work for all players. So, do all things in server side, and create text in client side. Good luck, hope it work =)

×
×
  • Create New...