A message in chat before kick/ban
#1

Hello everyone

I've got this code:

PHP код:
new string[128];
format(stringsizeof(string), "Admin %s[%i] just has banned player %s[%i]. [Reason: %s]"PlayerName(playerid), playeridPlayerName(id), idparam2);
SendClientMessageToAll(0xFF0000FFstring); // I will send a message to all at first
BanEx(idparam2); // I will ban the player 
The problem is - All players can see the message in chat except of the banned player.
The same situation will happen with Kick function. Why? Thanks in advance for a help
Reply
#2

You need to use a timer. Try googling on how to use it.
Reply
#3

Quote:
Originally Posted by MrThomas
Посмотреть сообщение
You need to use a timer. Try googling on how to use it.
Yes, I know how to use a timer, but it's a strange solution.

Is it not there any better solution, how to fix that?
Reply
#4

Quote:
Originally Posted by ForestCZE
Посмотреть сообщение
Yes, I know how to use a timer, but it's a strange solution.
This has been the way it has been done for at least a year or 2 now.

It's also posted about a lot, and if you'd searched, you'd have found it.
Reply
#5

You can use a unix timestamp inside OnPlayerUpdate.

IE...

https://pastebin.com/ememx0VR
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)