Jump to content

Mike269

Members
  • Posts

    218
  • Joined

  • Last visited

Posts posted by Mike269

  1. It's working, thank you very much! But how can I make a spawn for each team when they join, like for civlians when they join for first time, I stopped gamemode play because it was keep changing my skin so I guess I have to make my own spawns...

  2. Hello, well I've made a 3 teams Civilians, Army and Terrorists, (If you're not in any team you automaticly join Civilians)

    That's my code, but the problem is that when I reconnect/die I don't spawn at the position I wrote, help please!

    team = { } 
    team["Civilian"] =createTeam ( "Civilian", 102, 0, 102 ) 
    team["Army"] =createTeam ( "Army", 102, 51, 0 ) 
    team["Terrorists"] =createTeam ( "Terrorists", 204, 0, 0 ) 
      
    function lena(thePlayer) 
    local playerTeam = getPlayerTeam ( player ) 
    local ss = getTeamName ( playerTeam )   
    if ss=="Vampires" then 
    setTimer(azaz, 1800, 1, player) 
    outputDebugString("It's works") 
    setTimer(setElementPosition, 1800, 1 ,1094.7105712891,2092.7939453125,15.350400924683 ) 
    elseif  ss=="Werewolves" then 
    setTimer(setElementPosition, 1800, 1 ,7105712891,2092.7939453125,15.350400924683 ) 
    outputDebugString("It's works") 
    elseif  ss=="Civilians" then 
    setTimer(setElementPosition, 1800, 1 ,7105712891,2092.7939453125,15.350400924683 ) 
    outputDebugString("It's works") 
    end 
    end 
    addEventHandler("onPlayerWasted",getRootElement(),lena) 
      
    

  3. Hello guys, I am making a server and the save system doesn't Works right because everytime I die, my skin changes and I lose weapons, please help me, what should I edit here?

    local spawnpoint 
      
    addEventHandler("onResourceStart", resourceRoot, 
        function() 
            spawnpoint = getRandomSpawnPoint() 
            resetMapInfo() 
            for i,player in ipairs(getElementsByType("player")) do 
                spawn(player) 
            end 
        end 
    ) 
      
    function spawn(player) 
        if not isElement(player) then return end 
        if get("spawnreset") == "onSpawn" then 
            spawnpoint = getRandomSpawnPoint() 
        end 
        exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) 
        repeat until setElementModel(player,math.random(312)) 
        fadeCamera(player, true) 
        setCameraTarget(player, player) 
        showChat(player, true) 
    end 
      
    function getRandomSpawnPoint () 
        local spawnpoints = getElementsByType("spawnpoint") 
        return spawnpoints[math.random(1,#spawnpoints)] 
    end 
      
    addEventHandler("onPlayerJoin", root, 
        function() 
            spawn(source) 
        end 
    ) 
      
    addEventHandler("onPlayerQuit",root, 
        function () 
            if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then 
                spawnpoint = getRandomSpawnPoint() 
            end 
        end 
    ) 
      
    addEventHandler("onPlayerWasted", root, 
        function() 
            setTimer(spawn, 1800, 1, source) 
        end 
    ) 
    

  4. Hello guys, I am trying to script from 2012 but my english was very bad in 2012, now it's a little bit better and I thought you guys could give me some steps to start, oh and please can you tell me why save systems doesn't Works for me? Because of "play gamemode" it should save my skin weapons,money and position after restarting/quiting the server and save my skin & weapons when I die but it doesn't, also I got an awesome idea, is it possible to make a script like, example: You're in vampire team, and if you kill a civilian with knife/colt his skin got changed to vampire and he's moved into vampire team, please help me I can pay with paypal if someone could make that for me, thanks

  5. Hello MTA today I'm scripting arresting script and when I hit a player with nightstick he's transported to the prison wiht 4 corners, it's like a room but for that I need to get X Y Z position from where and to where you can't use weapons and text like "140 seconds left" is shown, is there a good video how to take positions or something? If anyone is ready to come in my server and show me how to do it ill be very happy!

    Part of the script:

      
    local prisonCells = { 
        {3424.6467285156,93.191673278809,16.86874961853}, -- Spawn point in the prison 
    } 
      
    local releasePoint = {2127.6013183594,2364.1135253906,10.8203125} -- Release point  
      
    --//PRISON EXTERIOR//-- 
    local vert1 = {3485.0334472656,-3.6232004165649,9.3687496185303} -- First left corner 
    local vert2 = {3368.0390625,183.78581237793,30.06875038147} -- Second right corner 
        local w = vert2[1] - vert1[1] 
        local h = vert2[2] - vert1[2] 
        local d = vert2[3] - vert1[3] 
      
    

  6. Hello guys I would like to know how can I make a zone that zombies can't enter, like they die when they try to enter, colored zone or somethin..

    +

    I really need level system connected with zombies and cool zombies

    If anyone know some zombie scripts please share them with me, because I'm making Zombie RPG server, thanks!

×
×
  • Create New...