Jump to content

BorderLine

Members
  • Posts

    1,027
  • Joined

  • Last visited

Posts posted by BorderLine

  1. I just understood my mistake and why all doesn't work.

    CLIENT.

    addEvent("Zomb_STFU",true) 
    addEventHandler("Zomb_STFU",root, 
    function ( zomb ) 
       triggerServerEvent ( "onZombieSpawned", zomb ) 
    end) 
    

    SERVER:

    addEvent("onZombieSpawned",true) 
    addEventHandler("onZombieSpawned",root, 
    function ( ) 
      giveWeapon ( source, 8, 1, true ) 
    end) 
    

    That should work :D

    This work perfect

    thank a lot Benxamix2, and solid and jhon..

    and the last question. i dont disturb.

    how i can add more weapons.

    I mean. not all zombies have same weapons, some chainsaw, others knife or katana

    what is that fuction for do that?

  2. dont show message, but im change Zomb_STFU to onZombieSpawn

      
      
    addEvent("onZombieSpawn",true) 
    addEventHandler("onZombieSpawn",root, 
    function ( zomb ) 
       if zomb and getElementType ( zomb ) == "ped" then 
            giveWeapon ( zomb, 8, 1, true ) 
            outputChatBox ( "zomb with weapon!" ) 
       end 
      
            outputChatBox ( "zombie spawned!" ) 
    end) 
      
    

    then show message "zombie spawned!"

  3. Hi forum's people.

    I need a big help, and is how i can give to zombies some weapons, like bat, or knife or other.

    The script is the same of slothman, and i dont know how start :S

    just i know how setteam to some ped, but i dont know if this is same.

    If someone know how doit, please :)

    my server is Biohazard, if someone want visit it :D (sorry offtopic, just say information)

  4. hi again people of forums :D

    well im try to make this script

    i want sound in weapons but with some distannce.

    my bug is.. dont sound like 3d sound..

    if you are away from others players.. you can hear the others weapons sounds..

    so im do this.. i dont know what is wrong.. the sounds are good..

    but dont wokr the 3d sound

    Clientside

      
    function onClientPlayerWeaponFire ( weapon ) 
        local Zx, Zy, Zz = getPedWeaponMuzzlePosition ( getLocalPlayer() ) 
         
        if weapon == 22 then--colt45 
                local sound = playSound3D("sounds/Colt45.mp3", Zx, Zy, Zz, false) 
            setSoundMaxDistance(sound, 30) 
        end  
    end 
    addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), onClientPlayerWeaponFire ) 
      
      
    

    The resource is more bigger.. but this is the example :)

    thanks

  5. Hi forum

    well i was looking the after post

    and ill make this

    -clientside

      
    local weapons = { 
       {fileName="ak47", model=355},{fileName="colt", model=346}, 
       {fileName="m4", model=356},{fileName="magnum", model=348}, 
       {fileName="mp5", model=353},{fileName="shotgun", model=349}, 
       {fileName="sniper", model=358},{fileName="spaz", model=350}  
    } 
      
    function load() 
        for index, weapon in pairs(weapons) do 
            txd = engineLoadTXD ( weapon.fileName.. ".txd" ) 
            engineImportTXD ( txd, weapon.model ) 
            dff = engineLoadDFF ( weapon.fileName.. ".dff", 0 ) 
            engineReplaceModel ( dff, weapon.model ) 
        end 
    end 
      
    addEventHandler("onClientResourceStart",resourceRoot, 
    function () 
        local version = getVersion() 
        if version.mta == "1.1.1" then 
            setTimer ( load, 1000, 1) 
        end 
    end) 
    

    and in meta

      
      
        

    i dont know what happen :/

    but weapons still be originals

  6. thx a loot

    now work with this code

    clientside-

      
    marker2 = createMarker (2797.5,-1465.6,19.218,"cylinder",1.1,255,255,225,255) 
      
      
    function m2 (hitplayer)  
        local sound = playSound("soundshop/hi.mp3")  
    end 
      
    addEventHandler("onClientMarkerHit", marker2, m2) 
      
      
    

  7. Hi community

    i have a question

    well im trying to make a script, and is like this

    serverside

      
      
    marker1 = createMarker (815.5,-1107.5,24.7,"cylinder",1.1,255,255,225,255) 
      
    function m1( ) 
      playSound ( "soundshop/hi.mp3", false ) 
    end 
    addEventHandler( "onMarkerHit", marker1, m1) 
    

    when im hit the marker, play the sound. but dont work :/

  8. maybe..
      
    -- remove color coding from string 
    function removeColorCoding (name) 
        return type(name)=="string" and string.gsub(name, "#%x%x%x%x%x%x", "") or name 
    end 
      
    -- getPlayerName with color coding removed 
    local _getPlayerName = getPlayerName 
    function getPlayerName(player) 
        if type(player) == "string" then 
            return removeColorCoding(player) 
        end 
        return removeColorCoding (_getPlayerName(player)) 
    end 
    

    aaaaaah you are the best man :D

    now is fix

    thanks alot..!!!!

    if some mod read this can be closed this post :D all are okey :D

  9. I dont know if i wrong but in the settimer you need put the name of fuction for set timer

    in this case you put

    setTimer(yo,300,46) 
    

    and the name of your fuction dont have name

    function () 
    local sound = playSound("disco_pogo.mp3") 
    

    maybe could be better if you separate the diferents funtions,

    playsound, randomsky, randomwater and randomcolourcar

    and put same comand for all

  10. Hi comunity.

    Well im a new user in forum.

    and i decide register because i learn much reading the forum's post. In special solidnake and JR10 you helpme so much

    Well i have a problem, i dont know if this is good or not.

    I want remove hex code from pm chat window

     function removeHEXFromString(str) 
    return str:gsub("#%x%x%x%x%x%x", "") 
    end 
    

    i dont know if i need put some "IF" or other fuction :S

    I maked much changes, but i cant doit :S

    and sorry for my english..

    i hope you can understan what i need

    here i have a img

    62886166.png

    Thanks :)

×
×
  • Create New...