Can someone please help?

Posted by Xano
Can someone help me? I'm trying to ban players but I can only ban guests.

The script i'm using is..

if(gms_self_admin_rights()) {

name = get_string("Username", "")
reason = get_string("Reason","")
days = get_integer("Days",10)
player_id = gms_other_find_by_name(name)


In the players step event

Replies (1)

Last message on 4 Sep 2017

Size43 (Administrator) on 4 Sep 2017, 11:18:08
Apologies for the delay, I've been having some health issues.

Can you check what the value of player_id is before calling gms_admin_ban? If it's 0 or -1, the other player might not be found.