#1

Hello,

from this code from CamelToe's gang fs

pawn Код:
command(creategang, playerid, params[])
{
        new string[128], gName[100], Query[200];
        if(PlayerInfo[playerid][Gang] != 0) return SendClientMessage(playerid, COLOR_YELLOW, "You are already an member of an gang, please quit that gang before creating a new one.");
        if(sscanf(params, "s[100]", gName)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /creategang [ Gang-name ].");
        if(CheckGangByName(gName)) return SendClientMessage(playerid, COLOR_YELLOW, "An gang with this name already exists.");
        format(Query, sizeof(Query), "INSERT INTO gangs (id, name, owner) VALUES (NULL, '%s', '%s');", gName, GetPlayerNameEx(playerid));
        format(string, sizeof(string), "You created an gang with name : %s, you were sat as owner of the gang.", gName);
        SendClientMessage(playerid, COLOR_GREEN, string);
        mysql_query(Query);
        PlayerInfo[playerid][Gang] = mysql_insert_id();
        format(Query, sizeof(Query), "UPDATE users SET gang = %d WHERE username = '%s';", PlayerInfo[playerid][Gang], GetPlayerNameEx(playerid));
    mysql_query(Query);
        return 1;
}
How would I be able to convert this code to sqlite

pawn Код:
PlayerInfo[playerid][Gang] = mysql_insert_id();
Reply


Messages In This Thread
SQL - by Cowboy - 16.10.2011, 20:04
Re: SQL - by Cowboy - 17.10.2011, 11:18
Re: SQL - by [HiC]TheKiller - 17.10.2011, 11:44
Re: SQL - by Cowboy - 17.10.2011, 21:31

Forum Jump:


Users browsing this thread: 1 Guest(s)