Ban - MySQL.
#1

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:
pawn Код:
pBannedIP,
    pBannedReason,
    pBannedBy,
The command:
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;
}
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.
Reply
#2

This is a scripting help forum after all.
I've seen many threads asking for MySQL help and people help them without saying anything or what so ever.
Reply
#3

It is regarding PAWN scripting, I am scripting in PAWN and I require assistance due my lack of knowledge.
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
If your question truly is a PAWN question then the answer is very simple:

pawn Код:
mysql_function_query()
That is how you run update and select queries from PAWN.
Yeah, but, I gotta format it first, but I'm not sure about it
pawn Код:
format(query, sizeof(query),"UPDATE `bans`...");
I don't remember how to do it.
Reply
#5

Mind reading the release thread ? (If you're using BlueG MySQL plugin.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)