18.09.2018, 16:19
Hi. I've tried to make an offline admin ban (ban someone by "username" even that username doesn't exist, which inserts into mysql) but it gives me this errors
It gives me argument mismatch at "jBan"
PHP код:
error 035: argument type mismatch (argument 1)
error 035: argument type mismatch (argument 1)
PHP код:
MD:offlinetban(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] >= 2)
{
new ban_target2[24], string[128];
if(sscanf(params, "s[24]", ban_target, ban_time, ban_reason)) return SendClientMessage(playerid, -1,""COL_RED"AdmCmds: /offlineban [Nickname] [Days] [Reason]");
format(string, sizeof(string),"*COL_RED*""%s %s has banned %s for %i days [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),ban_target, ban_time, ban_reason);
SendClientMessageToAll(-1, string);
jBan(ban_target2, playerid, ban_reason, ban_time, 1);
}
else {
SendClientMessage(playerid,-1,""COL_RED"EROARE: U aint admin!");
}
return 1;
}
CMD:offlineban(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] >= 2)
{
new ban_target3[24], string[128];
if(sscanf(params, "s[24]", ban_target3)) return SendClientMessage(playerid, -1,""COL_RED"AdmCmds: /offlineban [Nickname]");
format(string, sizeof(string), ""COL_RED"AdmCmds: %s %s has permanent banned %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),ban_target3, ban_reason);
SendClientMessageToAll(-1, string);
jBan(ban_target3, playerid, ban_reason, 0, 1);
}
else {
SendClientMessage(playerid,-1,""COL_RED"EROARE: U aint admin");
}
return 1;
}