Quote:
Originally Posted by Lorenc_
This will terminate your server honestly.
pawn Код:
public OnPlayerUpdate(playerid) { for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerInRangeOfPoint(i, 6, partyX, partyY, partyZ)) { PplJoinParty++; } return 1; }
I think you don't realize that OnPlayerUpdate calls more then once in a second. There this will waste so much memory (afaik with that loop). This is a infinite loop lol.
|
I see your point, I have added the if statement to check wether if a party is prepared or not, if it is, it'll loop, otherwise it won't do anything..(Also, when a player /startparty's, PartyPrepared = 0; so it's not an infinite loop anymore, just for a period of time.)
Thanks for the heads up, appreciated.
EDIT: I guess a better solution would be to use a timer for this, but I can't do that right now as I have lost this script, and too lazy to post the timer, will do so soon however.