Usage: gms_admin_ban ( player_id, reason, days )


Bans the given player for 'days' days, and kicks him.

'reason' is optional, and can be used to send the player a last message before getting kicked.

Warning:This function can be executed on every client, even guests. You'll need to check by using server_self_admin_rights and server_other_admin_rights whether the player is authorized to ban someone.

Replies (2)

Last message on 3 Oct 2014

MyLegGuy on 3 Oct 2014, 04:25:57
This isn't working for me. It says player to ban not found. Would you please add an example?
Size43 (Administrator) on 3 Oct 2014, 18:48:17
Admin functions can only ban/kick people that are logged in to your game at the time of calling the function. Please make sure the player you're trying to ban is in the same session as the client calling the function.