Jump to content

K4stic

Members
  • Posts

    708
  • Joined

  • Last visited

Posts posted by K4stic

  1. If I don't want to secure my scripts, why force me to?

    if you wont secure your scripts then you must don't care about it it's simple and easy if you want a secure just use the MTAsa Compiler

  2. Maths!
      
    Health = 50 
    Health =  tonumber (Health) / 100 * 100 
    print ( Health.."%") -- 50 % 
      
    

    As much as I know total health should be 100 or check it by yourself :P

    Health =  tonumber (Health) / 100 * 100 <= realy? :3 why even need /100 * 100 lol just useless stuff

  3. just replace lines 51-59 with this
    function arma22 ( hitElement1 ) 
    if ( getPlayerMoney(source) >= 2000 ) then 
       takePlayerMoney ( source, 2000 ) 
       givePlayerMoney ( source, 1700 ) 
       giveWeapon ( source, 30, 100 ) 
    end 
    end 
    addEvent( "onGreetinC", true ) 
    addEventHandler( "onGreetinC", root, arma22 ) 
    

    Not complete there is one at line 42 too.

    gghvc: replace thePlayer by source on line 42:

    givePlayerMoney ( thePlayer, 1700 ) 
    

    and 54:

    givePlayerMoney ( thePlayer, 1700 ) 
    

    and stop copying and pasting without knowing what you are actually doing.

    Sorry i just find a line of the bug and solve it My Mistake that i wasen't see and others. Also it Bad Coded you can reduse lot of lines there

  4. just replace lines 51-59 with this

    function arma22 ( hitElement1 ) 
    if ( getPlayerMoney(source) >= 2000 ) then 
       takePlayerMoney ( source, 2000 ) 
       givePlayerMoney ( source, 1700 ) 
       giveWeapon ( source, 30, 100 ) 
    end 
    end 
    addEvent( "onGreetinC", true ) 
    addEventHandler( "onGreetinC", root, arma22 ) 
    

  5. Something is wrong with this:
    function getAliveGuys ( mode ) 
        if not mode then return end 
        if mode == 1 then 
            pAlive = { }; 
            for _, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( getElementData ( player, "state" ) == "alive" ) then 
                    table.insert ( pAlive, player ); 
                end 
            end 
            return pAlive; 
        elseif mode == 2 then 
            return #pAlive; 
        elseif mode == 3 then 
            if pAlive then 
                pAlive = nil; 
            end 
            return false 
        end 
    end 
    

    It says i'm always at the last position, and gives mostly 50$.

    function getAliveGuys ( mode ) 
        if not mode then return end 
        pAlive = { }; 
        if mode == 1 then 
            for _, player in ipairs ( getElementsByType ( "player" ) ) do 
                if ( getElementData ( player, "state" ) == "alive" ) then 
                    table.insert ( pAlive, player ); 
                end 
            end 
            return pAlive; 
        elseif mode == 2 then 
            return #pAlive; 
        elseif mode == 3 then 
            if pAlive then 
                pAlive = nil; 
            end 
            return false 
        end 
    end 
    

    by logic the table must be up i mean before asked if mode == blabla as all modes use that table

  6. guiCreateStaticImage doesn't need onClientRender.

    And if you want to use it to update the image, there are better events that don't use that kind of resources.

    onClientRender not To Static Image :3 but to check if got Promote and etc

  7. use:

    [url=https://wiki.multitheftauto.com/wiki/GuiCreateStaticImage]https://wiki.multitheftauto.com/wiki/Gu ... taticImage[/url] 
    [url=https://wiki.multitheftauto.com/wiki/OnClientRender]https://wiki.multitheftauto.com/wiki/OnClientRender[/url] 
    

  8. I recommend Vortex Servers, because they cheap giving a Good Security[ about DDoS and etc], Server no lag and Everythink is Berfect

    P.S Lag that you getting from server it's your fault because of Big Distance from Server that locating the player for example

    if you Host a server in United Kindom just all American will have little slow speed but Players in Europe will have Good speed

×
×
  • Create New...