Ban reasons are displayed as (null) in samp.ban - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Ban reasons are displayed as (null) in samp.ban (
/showthread.php?tid=497579)
Ban reasons are displayed as (null) in samp.ban -
AnthonyTimmers - 27.02.2014
Код:
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)
Re: Ban reasons are displayed as (null) in samp.ban -
SKAzini - 27.02.2014
pawn Код:
SetTimerEx("BanPublic", 1000, false, "d", id);
Use this:
pawn Код:
SetTimerEx("BanPublic", 1000, false, "ds", id, reason);
You should see what the problem was.