12.07.2013, 12:15
I'm sorry with opening all these threads, but I just don't get how to make a ban system with MySQL.
I tried, and this is what I have so far,
The variables:
The command:
I'm not sure how can I select the query, then update it, I don't remember and can't find it, if you can either explain it step by step or send a tutorial, I'd be gratful.
I tried, and this is what I have so far,
The variables:
pawn Код:
pBannedIP,
pBannedReason,
pBannedBy,
pawn Код:
COMMAND:ban(playerid, params[]) {
new
string[250],
target;
getdate(D, M, Y);
if(PlayerInfo[playerid][pAdmin] < 1) return S(playerid, RED, NOADMIN);
if(sscanf(params, "us[128]", target, params)) return S(playerid, WHITE, "[Parameters]: /ban (playerid) (reason)");
format(string, sizeof(string), "Server action: %s has been banned by %s, reason: %s (%d/%d/%d)", GN(target), GN(playerid), params, D, M, Y);
SA(0xff000000, string);
return true;
}