-
Posts
1,390 -
Joined
-
Last visited
-
Days Won
1
Everything posted by HunT
-
È una cazzata,pensa che mentre sto scrivendo già ho la script in mente. Ma non lo faccio se non inizi tu. Non siamo il mercatino per le script.
-
90E what? Euro LOL ? Anyway report the bug to owner script.
-
Logico che funziona -.- Quello che ho fatto io funziona il problema e che non capisco cosa vuoi fare. Se mi spieghi cosa vuoi aggiungere o fare io te lo posso fare,ma devi essere chiaro sui dettagli. Ora abbiamo che quando muoiono tutti gli umani parte la nuova mappa. Tu vuoi il timer map? Dopo 5 minuti parte automaticamente la nuova mappa?
-
Dopo le 5 sono al pc. Cmq è inutile scrivere ancora su scripting per il next map,l ho risolto il problema.
-
Ma non è meglio includere la resource zombie in modo che quando tutti gli umani diventato zombie si cambia mappa. Sinceramente la tua idea non credo sia fattibile
-
Vabe è una stupidata quando sono al pc la riparo. Quello che non mi è chiaro e che il player come fa a diventare zombie? La script ha il friendlyFire con il valore false. Cioè,spiegami cosa intendi per humans vd zombie.
-
Aggiungi la risorsa come sta : http://www.mediafire.com/download/6uwvl ... lv1/aa.zip Gia testata
-
Certo. Ma cazzo scaricati steam facciamo prima
-
scusa ma non è meglio 5 secondi invece di 10?
-
Se mi fai un immagine è meglio,ad esempio una faccia da zombie cin scritto sotto win. Un po' di immaginazione Solo il testo è patetico.
-
Prova Adesso 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 ); setPlayerTeam ( plr, teamSurvivor ) 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 ) setPlayerTeam (plr, teamSurvivor ) 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 , 1000 , 1 , source, x, y, z, rot) setCameraTarget ( source, source ) setTimer(checkZombieForNextMap,3000,1) 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 ) -- // Hai eliminato il nextmap della versione originale -.- function checkZombieForNextMap () local theTeam = getTeamFromName ( "Zombies" ) if theTeam then numberPLayers = tonumber( getElementsByType( "player" )) numberZombie = tonumber (getPlayersInTeam ( theTeam )) if numberPLayers == numberZombie then setTimer(StartNextMap,10000,1) -- qui puoi aggiungere un trigger client per far apparire un immagine per il nextmap o il tempo o un testo. end end end function StartNextMap () exports.mapmanager:changeGamemode( getResourceFromName('aa') ) end
-
Che faticaccia Ci sono alcuni bug che non riguardano quello che ho fatto,ad esempio quando il player spawna non sta nel team humans. cmq prova ora e fammi sapere,a me funziona ma sono solo io nel Home server.Devi provare con altri giocatori. 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 , 1000 , 1 , source, x, y, z, rot) setCameraTarget ( source, source ) setTimer(checkZombieForNextMap,3000,1) 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 ) -- // Hai eliminato il nextmap della versione originale -.- function checkZombieForNextMap () local theTeam = getTeamFromName ( "Zombies" ) if theTeam then numberPLayers = tonumber( getElementsByType( "player" )) numberZombie = tonumber (getPlayersInTeam ( theTeam )) if numberPLayers == numberZombie then setTimer(StartNextMap,10000,1) -- qui puoi aggiungere un trigger client per far apparire un immagine per il nextmap o il tempo o un testo. end end end function StartNextMap () exports.mapmanager:changeGamemode( getResourceFromName('aa') ) end
-
Fai una cosa,passami l intera cartella e stasera te la riparo. Senza la gamemode non posso risolvere questi problemi. Una cosa ancor piu pratica e che se hai steam mi aggiungi e quando hai bisogno d aiuto ti rispondo subito. Il nome su steam è Hunterix (lol)
-
L hai testato quello che ti ho dato? Se hai problemi dagli -1 a numberPlayers
-
addEventHandler("onPlayerWasted", root, function() local numberPLayers = getPlayerCount() local numberZombie = getPlayersInTeam ( Zombies ) if tonumber (numberPLayers) == tonumber (numberZombie ) then setTimer(StartNextMap,10000,1) end end ) Non l ho testata,aggiungila sotto e vedi se funge (credo di si)
-
Si ma mi spieghi perche cazzo fai il post anche in scripting? Non vuoi essere aiutato allora,aspetto che ti risponda qualcuno li allora.
-
Give me name of image and I make the script . Edit : This is the example : http://www.mediafire.com/download/dxwa6 ... exture.zip Resource start make the texture and resource stop remove the texture. Fire Face:
-
Si ma non mi hai detto quando deve partire la nuova mappa. Quando rimane un player o tutti zombie. Dettagli
-
But u don't have the TXD work shop? Anyway the explosion is not on particle.txd maybe in effectsPC.txd Download the txd workshop open the file and export the images. Edit the image and make the script with shader for replace the image.
-
Se vuoi fare in modo che parte una nuova mappa quando tutti diventano zombie e molto semplice. Fai uno script client side con onClientRender. Esempio : numeroPlayers = get players online numeroZombie = get players nel team zombie if numeroPlayers == numeroZombie then -- qui serve il tonumber setTimer(StartNextMap,10000,1) oppure solo StartNextMap () se vuoi farla partire sbt
-
Ok ho capito il problema,attualmente la gamemode cambia mappa quando un player passa su un marker,mentre invece tu vuoi che cambia mappa quando tutti diventano zombie? Cmq la funzione è questa : function StartNextMap () exports.mapmanager:changeGamemode( getResourceFromName('aa') ) end Se hai cambiato nome alla gm non dimenticare di editare "aa" con quello che hai scelto,e le mappe devono essere tipo lol-mappa invece di aa-mappa
-
Se la gm funziona con cosa la usi? .map o createObject? Non è possibile che il codice che hai postato è una gm completa
-
https://wiki.multitheftauto.com/wiki/En ... rldTexture
-
La script Che hai postato non e d aiuto. Che gm usi come "background"?