14.04.2013, 22:34
I have this cmd:
And the cached data is:
Timer:BanPlayerEx
And on samp.ban
127.0.0.1 [15/04/13 | 01:58:19] Drake_Jonhonson - (null)
why it's null?
pawn Код:
CMD:ban(playerid, params[])
{
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
new id, reason[128];
if(sscanf(params,"us[128]",id,reason)) return SyntaxMSG(playerid, "/ban [playerid/PartOfName] [reason]");
if(!PlayerIsOn(id)) return NotConnectedMSG(playerid);
format(msg, sizeof(msg), "AdmCmd: %s was banned by %s, reason: %s.", GetName(id), GetName(playerid), reason);
format(query, sizeof(query), "INSERT INTO `bans` (name, reason, playerIP) VALUES ('%s', '%s', '%s')", GetName(id),reason,GetPlayerIP(id));
mysql_function_query(dbHandle, query, true, "BanWithMSGEx", "iss", id, msg, reason);
return 1;
}
pawn Код:
public BanWithMSGEx(playerid, message[], reason[])
{
PlayerInfo[playerid][pBanned] = 1;
SCMALL(0xFF4444FF, message);
SetTimerEx("BanPlayerEx",100,0,"ds[128]",playerid,reason);
}
pawn Код:
public BanPlayerEx(playerid, reason[])
{
BanEx(playerid, reason);
}
127.0.0.1 [15/04/13 | 01:58:19] Drake_Jonhonson - (null)
why it's null?