Douks08fr Posted May 17, 2013 Share Posted May 17, 2013 Hi everybody, I managed to edit my ped spawning script to set a per-player (+server) zombie limit. Global limit is set to 200 (ie), each player can spawn 15 peds which will follow them. If the player kill one of them, the a new ped can spawn as the count is under the limit. So, to do that i've tried the following : local variable follow When the ped-spawn is called on my script, it add +1 on a "setElementData" attached to player name. And so, if he kill one, this "setElementData" got -1 as value (actual -1) In the paper, this way to do looks really perfect But in fact, not really. The spawn stop at 15 (its fine), but if another player connect, no ped spawn for him (so, the per-player 15 is set to the entire server). Does anyone have any idea about this function or maybe some help ? Thank you very much and have a nice week-end. Link to comment
Schlammy Posted May 22, 2013 Share Posted May 22, 2013 playertable and there you make a ped table for each player Or like this pedCountTable = {} then you can set a new item for each player pedCountTable[thePlayer] = countOfPeds Link to comment
Halfmillz Posted May 22, 2013 Share Posted May 22, 2013 I have a same problem in this forum viewtopic.php?f=91&t=59243 but now don't work T_T Link to comment
Douks08fr Posted May 22, 2013 Author Share Posted May 22, 2013 playertable and there you make a ped table for each player Or like this pedCountTable = {} then you can set a new item for each player pedCountTable[thePlayer] = countOfPeds Thank you for your help, its was really helpful. But, It looks that making this limit is harder than I thought. Thank you anyway 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