22.02.2014, 12:56
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;
}