Faction, MySQL
#1

pawn Код:
CMD:factions(playerid, params[])
{
    new string[128];
    for(new i=0;i<MAX_FACTIONS;i++)
    {
        if(strlen(fInfo[i][fName]) == 0) continue;
        format(string, sizeof(string), "MySQL ID: %d (ID: %d) "#DIALOG_GREEN#" %s", fInfo[i][fID], i, fInfo[i][fName]);
        SCM(playerid, -1, string);
    }
    return 1;
}

CMD:deletefaction(playerid, params[])
{  
    new facID, szQuery[128];
    if(sscanf(params, "d", facID)) return SCM(playerid, -1, "Usage: /deletefaction <faction ID>");
    format(szQuery, sizeof(szQuery), "DELETE FROM `factions` WHERE `fID` = %d", fInfo[facID][fID]);
    mysql_pquery(dbHandle, szQuery);
    format(fInfo[facID][fName], 0, "");
    fInfo[facID][fID] = 0;
   
    LoadFactions();
    return 1;
}
When I delete a faction it is removed from the MySQL database, it's still listed IG via /factions however, how do I fix this?
Reply


Messages In This Thread
Faction, MySQL - by BigGroter - 22.02.2014, 12:56
Re: Faction, MySQL - by Vince - 22.02.2014, 13:00
Re: Faction, MySQL - by BigGroter - 22.02.2014, 13:31
Re : Faction, MySQL - by S4t3K - 22.02.2014, 13:48
Re: Faction, MySQL - by BigGroter - 22.02.2014, 13:53
Re : Faction, MySQL - by S4t3K - 22.02.2014, 14:13
Re: Faction, MySQL - by BigGroter - 22.02.2014, 14:31
Re : Faction, MySQL - by S4t3K - 22.02.2014, 14:35
Re: Faction, MySQL - by BigGroter - 22.02.2014, 14:47

Forum Jump:


Users browsing this thread: 1 Guest(s)