0.3x Kick() Problem
#1

If anyone tries to login and if the password is right. The player will be logged in, but i have 2 Server for my TDM Server, if the player is online in another server, the server won't let him to login.
pawn Code:
format(str, sizeof(str), "SELECT status FROM users WHERE username = '%s'", EscapeName(playerid));
mysql_query(str);
mysql_store_result();
new status = mysql_fetch_int();
mysql_free_result();

if(status == 1)
{
    SendClientMessage(playerid, COLOR_RED, "You are alreay logged in another server.");
    Kick(playerid);
}
My Bug: Now my bug is the server kicks the player and doesn't send him this ClientMessage. I set the status on mysql intentionally to 1 so i'll check if it works or not. But it doesn't work.
I get kick but no ClientMessage.

It was working perfect in version 0.3e
Reply
#2

same issue here https://sampforum.blast.hk/showthread.php?tid=411763
Reply
#3

Same here, it doesnt send msg about invalid RP name, but just kick without any notice, I have that kick under OnPlayerRequestClass
Reply
#4

It had to be changed at some point (0.3d?) so that Kick() ceased all communication with the player immediately and didn't allow them to respond to any messages. It was done because of some type of attack.

That means you'll need to Kick on a timer if you need to send them a message before booting them off the server. Maybe a future server update will have a KickWithNotice() function or something.
Reply
#5

Quote:
Originally Posted by Kalcor
View Post
KickWithNotice() function or something.
Would be great

Max
Reply
#6

Yeah, I was wondering about this. I was messing around with a friend in my server, he /kick'd me, and it didn't send a message.
Reply
#7

What about a KickEx with a timer that delay the kick of 800ms ?
Reply
#8

Strings are currently unusable with StartTimerEx :/
Reply
#9

You can use http://forum.sa-mp.com/showpost.php?...2&postcount=14
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)