Well i made a function with timer including with pinfo class! So when i joined the server, and begin to test it, so it was working fine, and, so i just quit, and, i forgot to see something in server, so i went again plus when i went the timer was opened with the same ID as mine ._. and it was showing me!!!! OMG!, so is their any other thing i missed while scripting ? basically in player part, do i need to remove the pinfo[player.ID] :( ?and if yes, so how?
P.S: Sorry, for my bad english...
pinfo[player.ID] = null;
???
Quote from: MatheuS on Oct 02, 2015, 06:44 PMpinfo[player.ID] = null;
???
okay, but that's why it was showing the timer function to the same Id, of other person, so i've to remove that in player part right?
P.s i'm from mob sorry for my more worst english.
I don't get you from your english but I think you want this.
function onPlayerJoin(player)
{
mytimer <- NewTimer("abc",50000,1)
}
function onPlayerPart(player)
{
mytimer.Delete();
}
Untested.
Nope, but i mean that! Is it needed to remove player from player part function in of pinfo class?
pinfo[player.ID]=null;
//This isn't a must.
//But you must save the stats.
//Like you attached an array to the database.
//You must do QuerySQL(yourdbname,"UPDATE yourtable SET wotever='" pinfo[player.ID].arraywotever "'");
Untested.
Put this on onPlayerPart xD
KickPlayer(player);
Now remove part messages from server.conf
And make a function for it.
This isn't a place to spam jokes,
@KAKAN .
1st of all This isn't even a joke
My way was:-
Put that on onPlayerPart, set partmessages to false in server.conf(or wherever you use)
Now create your own function and name the kick to disconnected.
Simple as that.
BUT remember it would affect your kick cmd
What will happen if you kick the player when he is leaving? That might prevent reconnecting for death evade. Might.
I don't get what kicking a player when he leaves has to do with a timer that keeps running?