21.12.2016, 10:57
Hey, i have a question...
In 0.3x server sometimes some people use those stupid s*beit shits to connect alot of bots and spam the server with joins / time outs and that makes the server aswell... i managed to make a anti bot join spam that bans em but still they manage to join (and get banned next instant).
So my question was how could i make something like if the last join in server was before 1 second then send the message "x joined the server..." else if it was before 1 second... dont send the message in chat that the player joined.
i tried:
But it doesnt work... any solutions?
EDIT: Could doing lastJoin = gettime(); under join message solve the problem? (not at pc to test)
In 0.3x server sometimes some people use those stupid s*beit shits to connect alot of bots and spam the server with joins / time outs and that makes the server aswell... i managed to make a anti bot join spam that bans em but still they manage to join (and get banned next instant).
So my question was how could i make something like if the last join in server was before 1 second then send the message "x joined the server..." else if it was before 1 second... dont send the message in chat that the player joined.
i tried:
PHP код:
new lastJoin;
OnPlayerConnect(playerid)
{
lastJoin = gettime();
if((gettime() - lastJoin)>=2)
{
// send message
}
return 1;
}
EDIT: Could doing lastJoin = gettime(); under join message solve the problem? (not at pc to test)