iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 sorry, but don't work, can you help me? because you dont own the script for this exported function https://community.multitheftauto.com/ind ... ails&id=16 To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 sorry, give me the full script for the next map? Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 sorry, give me the full script for the next map? Explain me more. Because i don't understand what you say To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 I am italian, sorry Can you write the code for when there are no more humans, we move to the next map? This is the script that I need to enter the gamemode? : function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then exports.mapmanager:changeGamemode( getResourceFromName('aa') ) -- function for changing the map end end ) Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 After downloading the script i posted it up Put it on your script, and add this function after "AreSurvivorsGone()" at "onPlayerWasted": exports.mapmanager:changeGamemode( getResourceFromName('aa') ) You will have to remove auto-respawn to make it working, otherwise the team will be always alive(if the server has players) function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then -- function for changing the map end end ) To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 How do I delete the auto-respawn? Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 How do I delete the auto-respawn? what is auto-respawn? To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 Where should I put this code? function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then exports.mapmanager:changeGamemode( getResourceFromName('aa') ) -- function for changing the map end end ) Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 Where should I put this code? function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then exports.mapmanager:changeGamemode( getResourceFromName('aa') ) -- function for changing the map end end ) put it under the codes in the gamemod To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 I did it, but it does not work I have map manager! Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 I did it, but it does not workI have map manager! debugscript 3 To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 How to use the debugscript? Now I'll explain better, I wish that when the team human there is no one to go to the next map Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 write it in F8 debugscript 3 To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 There aren't errors in the gamemode aa and on this script Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 write the gamemod and use LUA syntax box that i read carefully without mistakes To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 I did not understand what should I do Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 I did not understand what should I do post the gamemod here and use LUA syntax. use this [lua]-- your code here[*/lua] Delelte the * and write the code between the parentheses. To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 This script?? : function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then exports.mapmanager:changeGamemode( getResourceFromName('aa') ) outputChatBox ( "Zombies Wins.", source, 255, 0, 0 ) -- function for changing the map end end ) Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 This script?? : function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then exports.mapmanager:changeGamemode( getResourceFromName('aa') ) outputChatBox ( "Zombies Wins.", source, 255, 0, 0 ) -- function for changing the map end end ) no, i asked about your gamemod with the team and all codes To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 okok Gamemode : local aa_root = getRootElement() teamSurvivor = createTeam ( "Humans", 0, 255, 0 ) teamZombies = createTeam ( "Zombies", 255, 0, 0 ) function loadmap(startmap, player) mapRoot = getResourceRootElement(startmap) local plrs = getElementsByType( "player" ); for i, plr in pairs( plrs ) do setElementData( plr, "Deaths", 0 ) -- ///////////////// SPAWN \\\\\\\\\\\\\\\\\\\\ local total_spawns = getElementChildrenCount( getElementByID( "spawns" ) ) local num = math.random( 0, total_spawns - 1 ) local spawn_random = getElementChild ( getElementByID( "spawns" ), num ) local x = getElementData ( spawn_random, "posX" ) local y = getElementData ( spawn_random, "posY" ) local z = getElementData ( spawn_random, "posZ" ) local rot = getElementData ( spawn_random, "rot" ) setTimer( setPedSkin , 500 , 1 , plr, math.random(9,288)) spawnPlayer( plr, x, y, z, rot); setCameraTarget ( plr, plr ); fadeCamera( plr, true ); for k,v in ipairs( getElementChildren( getElementByID( "armas" ) ) ) do giveWeapon( plr, tonumber( getElementData( v, "id" ) ), getElementData( v, "ammo" ) ) end end end addEventHandler("onGamemodeMapStart", aa_root, loadmap) function aa_onResourceStart( resourcename, res ) setTeamFriendlyFire(teamSurvivor , false ) if ( resourcename == getThisResource () ) then local plrs = getElementsByType( "player" ); for i, plr in pairs( plrs ) do setElementData( plr, "Deaths", 0 ) end setTimer( call, 1000, 1, getResourceFromName("scoreboard"), "addScoreboardColumn", "Deaths" ) end if resourceName == 'mapmanager' then mapmanager = createResourceCallInterface('mapmanager') end end addEventHandler( "onResourceStart", aa_root, aa_onResourceStart ) function joinHandler() local total_spawns = getElementChildrenCount( getElementByID( "spawns" ) ) local num = math.random( 0, total_spawns - 1 ) local spawn_random = getElementChild ( getElementByID( "spawns" ), num ) local x = getElementData ( spawn_random, "posX" ) local y = getElementData ( spawn_random, "posY" ) local z = getElementData ( spawn_random, "posZ" ) local rot = getElementData ( spawn_random, "rot" ) setElementData( source, "inmarker", false ); setPlayerTeam ( source, teamSurvivor ) spawnPlayer( source, x, y, z, rot ) setTimer( setPedSkin , 500 , 1 , source, math.random(9,288)) outputChatBox("< Welcome To Against All By CHAOS_IS_ME>", source, 255, 138, 0, true) outputChatBox("< Current Version: #00FF00 1.0>", source, 255, 138, 0, true) setCameraTarget ( source, source ) setElementData( source, "Deaths", 0 ) fadeCamera(source, true) for k,v in ipairs( getElementChildren( getElementByID( "armas" ) ) ) do giveWeapon( source, tonumber( getElementData( v, "id" ) ), getElementData( v, "ammo" ) ) end end addEventHandler("onPlayerJoin", aa_root, joinHandler) function aa_playerWasted( totalAmmo, killer ) local playerdeaths = getElementData ( source, "Deaths" ) setElementData ( source, "Deaths", playerdeaths+1 ) local total_spawns = getElementChildrenCount( getElementByID( "spawns" ) ) local num = math.random( 0, total_spawns - 1 ) local skin = math.random(9,288) local spawn_random = getElementChild ( getElementByID( "spawns" ), num ) local x = getElementData ( spawn_random, "posX" ) local y = getElementData ( spawn_random, "posY" ) local z = getElementData ( spawn_random, "posZ" ) local rot = getElementData ( spawn_random, "rot" ) setPlayerTeam ( source, teamZombies ) setTimer( spawnPlayer , 5000 , 1 , source, x, y, z, rot) setCameraTarget ( source, source ) fadeCamera(source, true) --[[ idk what the is dat for k,v in ipairs( getElementChildren( getElementByID( "armas" ) ) ) do setTimer( giveWeapon, 5000 , 1 , source, tonumber( getElementData( v, "id" ) ), getElementData( v, "ammo" ) ) end]] end addEventHandler ( "onPlayerWasted", aa_root, aa_playerWasted ) local localPlayerName = getPlayerName(aa_root) -- ///////////////// Cose aggiunte da me \\\\\\\\\\\\\\\\\\\\ -- ///////////////// Quando un umano muore, entra nel gruppo zombies \\\\\\\\\\\\\\\\\\\\ infection = createPickup (-1, 1, 3.11, 3, 1275, 15000 ) function infected ( thePlayer ) setPlayerTeam ( thePlayer, teamZombies ) setPedSkin ( thePlayer, 13 ) setPedHeadless ( thePlayer, true ) end addEventHandler ( "onPickupUse", infection, infected ) addEventHandler("onPlayerSpawn", root, function() if(getPlayerTeam(source) == teamZombies) then local weaponsToGive = { { id = 4, ammo = 30, setAsCurrent = true }, -- your knife } for _, v in ipairs(weaponsToGive) do giveWeapon(source, v.id, v.ammo, v.setAsCurrent) end setElementModel(source, 137) setPedHeadless ( source, true ) outputChatBox ( "You are now a Zombie.", source, 255, 0, 0 ) end end ) -- ///////////////// Quando muoiono tutti gli umani si passa ad un altra mappa \\\\\\\\\\\\\\\\\\\\ function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then exports.mapmanager:changeGamemode( getResourceFromName('aa') ) outputChatBox ( "Zombies Wins.", source, 255, 0, 0 ) -- function for changing the map end end ) Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 i'm Really cunfused i can't help you with maps sorry i hope anyone can help you. To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 okok, but how do I do that after 10 minutes the gameplay switches to the next map Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
iMr.3a[Z]eF Posted July 7, 2013 Posted July 7, 2013 okok, but how do I do that after 10 minutes the gameplay switches to the next map use : setTimer To Visit Us Press Here: mtasa://5.9.206.180:22002
☻ᶠᶸᶜᵏᵧₒᵤ☻ Posted July 7, 2013 Author Posted July 7, 2013 okok, but can you help me for settimer ??? I'm not good at Scripting Canale YouTube : https://www.youtube.com/user/SAItalian3xpert?feature=mhee Sito : http://sa-iexperts.forumfree.it/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now