Ban reasons are displayed as (null) in samp.ban
#1

Код:
forward BanPublic(id, reason[]);
public BanPublic(id, reason[])
{
    BanEx(id, reason);
}

stock BanWithMessage(id, color, message[], reason[], adminname[], name[])
{
    SendClientMessage(id, color, message);
    new banmessage[256];
    format(banmessage, sizeof(banmessage), "%s has been banned by %s - (Reason: %s).", name, adminname, reason);
    print(banmessage);
    SetTimerEx("BanPublic", 1000, false, "d", id); // Delay of 1 second before banning the player so he receives the message
}
The reason is displayed properly in the message and when printed.. However in samp.ban there isn't a reason, but instead it states (null)
Reply
#2

pawn Код:
SetTimerEx("BanPublic", 1000, false, "d", id);
Use this:

pawn Код:
SetTimerEx("BanPublic", 1000, false, "ds", id, reason);
You should see what the problem was.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)