OnPlayerUpdate question
#1

Hello. I am using a Godfather edit and I saw that it has the OnPlayerUpdate callback. now I heard that it is not good to save files in OnPlayerUpdate because it gets called too much times per second, so if I create a new callback called UpdatePlayer(playerid) it will be better? Of course I will change all the OnPlayerUpdate(playerid); to UpdatePlayer(playerid);

I have another question now, when I changed the name, should I add a timer somewhere? if yes, where?
Reply
#2

You don't need to add a timer. Just replace the name.
Reply
#3

but you should add a timer, maybee 10minutes, and set it to onplayerdisconnect, too
Reply
#4

Quote:
Originally Posted by DeDiHosting
but you should add a timer, maybee 10minutes, and set it to onplayerdisconnect, too
If he has a Godfather edit, he already has it.
Reply
#5

Thank you guys, I changed it now.
Does it really change something ?
Reply
#6

pawn Код:
forward SavePlayerStats();

SetTimer("SavePlayerStats",5000,1);

public SavePlayerStats()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
// Things you want to save here
}

}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)