MetaGamer Posted January 18, 2011 Share Posted January 18, 2011 not works. It gives black screen Link to comment
NotAvailable Posted January 18, 2011 Share Posted January 18, 2011 I cant find how to make a zombie zone on the wiki Link to comment
Slothman Posted January 19, 2011 Author Share Posted January 19, 2011 yeah, sorry. my wiki access needs to be reset. so heres how: setElementData(myRadarArea, "zombieProof", true ) just replace "myRadarArea" with the radar area you want zombieproofed. this will prevent zombies from spawning in that area. it will not prevent them from going into the area though, so you might want to build a fence. Link to comment
Tomek123 Posted January 22, 2011 Share Posted January 22, 2011 How i can save zombie kills? Link to comment
Slothman Posted January 22, 2011 Author Share Posted January 22, 2011 you would have to save it to player accounts, which is something thats beyond the scope of this script, but can be learned about in the wiki, Link to comment
Tomek123 Posted January 22, 2011 Share Posted January 22, 2011 Can you give me link ? I can't find this. :\ Link to comment
Slothman Posted January 22, 2011 Author Share Posted January 22, 2011 the more important one is here: https://wiki.multitheftauto.com/wiki/SetAccountData heres the rest of the account functions: https://wiki.multitheftauto.com/wiki/Ser ... _functions Link to comment
Hyunsu Posted January 22, 2011 Share Posted January 22, 2011 Does this resource have perfect sync system? Link to comment
Slothman Posted January 22, 2011 Author Share Posted January 22, 2011 define "perfect" the zombies are synced for all players, but if a player is laggy you will notice some choppyness as the zombies resync themselves. Link to comment
Tomek123 Posted January 22, 2011 Share Posted January 22, 2011 What is wrong? function onPlayerQuit ( ) -- when a player leaves, store his current money amount in his account data local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerzombiekills = getPlayerZombieKills ( source ) setAccountData ( playeraccount, "piraterpg.zombiekills", playerzombiekills ) end end function onPlayerJoin ( ) -- when a player joins, retrieve his money amount from his account data and set it local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then local playerzombiekills = getAccountData ( playeraccount, "piraterpg.zombiekills" ) -- make sure there was actually a value saved under this key (check if playermoney is not false). -- this will for example not be the case when a player plays the gametype for the first time if ( playerzombiekills ) then setPlayerZombieKills ( source, playerzombiekills ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerJoin", getRootElement ( ), onPlayerJoin ) Link to comment
Castillo Posted January 22, 2011 Share Posted January 22, 2011 getPlayerZombieKills?????? wtf? i think you should do: getElementData(source, "Zombie kills") and: setElementData(source, "Zombie kills", playerzombiekills) Link to comment
Hyunsu Posted January 22, 2011 Share Posted January 22, 2011 (edited) define "perfect"the zombies are synced for all players, but if a player is laggy you will notice some choppyness as the zombies resync themselves. if server ping is high, are zombies choppy? Edited January 22, 2011 by Guest Link to comment
Tomek123 Posted January 22, 2011 Share Posted January 22, 2011 getPlayerZombieKills?????? wtf?i think you should do: getElementData(source, "Zombie kills") and: setElementData(source, "Zombie kills", playerzombiekills) I'm new to this so I do not know these commands. I tried and still does not work: \ Link to comment
Castillo Posted January 22, 2011 Share Posted January 22, 2011 when a player joins he is not logged in, so you have to use onPlayerLogin as eventHandler, addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerJoin ) Link to comment
Slothman Posted January 22, 2011 Author Share Posted January 22, 2011 if server ping is high, are zombies choppy? all pedestrians in mta are automatically synced by one of the players ingame. mta uses its own system to choose who syncs them, and it does a good job of it. when you are the syncer, the peds will always look smooth and operate very well. when someone else is the syncer and they have a high ping, then you migh notice some chopiness. to avoid the impact of this, when a zombie attacks a person, it is scripted to set the syner to the person the zombie is chasing. this greatly reduces any problems. in any event, the whole thing works well, but nothing in life is perfect. Link to comment
AGENT_STEELMEAT Posted January 22, 2011 Share Posted January 22, 2011 How just wondering, how do I stop zombies from spawning within a certain radar area? You might wanna update your wiki info. Link to comment
Slothman Posted January 22, 2011 Author Share Posted January 22, 2011 from 1 page previous: yeah, sorry. my wiki access needs to be reset. so heres how:setElementData(myRadarArea, "zombieProof", true ) just replace "myRadarArea" with the radar area you want zombieproofed. this will prevent zombies from spawning in that area. it will not prevent them from going into the area though, so you might want to build a fence. Link to comment
Hyunsu Posted January 23, 2011 Share Posted January 23, 2011 if server ping is high, are zombies choppy? all pedestrians in mta are automatically synced by one of the players ingame. mta uses its own system to choose who syncs them, and it does a good job of it. when you are the syncer, the peds will always look smooth and operate very well. when someone else is the syncer and they have a high ping, then you migh notice some chopiness. to avoid the impact of this, when a zombie attacks a person, it is scripted to set the syner to the person the zombie is chasing. this greatly reduces any problems. in any event, the whole thing works well, but nothing in life is perfect. why zombie can sync only one player? i think, this function is setElementSyncer. Link to comment
SDK Posted January 23, 2011 Share Posted January 23, 2011 That's what he said, didn't he? When the zombies attack someone, the script uses setElementSyncer to set the player being attacked as syncer for the zombies attacking. setElementSyncer can not add more players syncing btw, it can only change the player syncing peds. Link to comment
NotAvailable Posted January 25, 2011 Share Posted January 25, 2011 Where can i see the anti zombie zone wiki page? Link to comment
12p Posted January 25, 2011 Share Posted January 25, 2011 Where can i see the anti zombie zone wiki page? yeah, sorry. my wiki access needs to be reset. so heres how:setElementData(myRadarArea, "zombieProof", true ) just replace "myRadarArea" with the radar area you want zombieproofed. this will prevent zombies from spawning in that area. it will not prevent them from going into the area though, so you might want to build a fence. Link to comment
Tunner Posted January 30, 2011 Share Posted January 30, 2011 wohoo! ive finaly remembered the password! So here is my problem as i mentioned on comunity site. Im trying to do a zombie-free zone but that SetElementdata doesnt seem to work. it either doesnt work at all or the zombies dont spawn anywhere. the zone itself is functioning (green radar area and such) but the zombies dont work as they should. Please could you give me a hand with this one or post an example? THX in advance Link to comment
Castillo Posted January 31, 2011 Share Posted January 31, 2011 Uhm, i have a question about your resource, is possible to set their dimension? like in the map file where you set the spawn points, Thanks in advance. Link to comment
Slothman Posted January 31, 2011 Author Share Posted January 31, 2011 post the part of the script that you use to create the radararea and set its elementdata Link to comment
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