Sziasztok !!!
itt van egy bank blance
if(strcmp(cmd, \"/balance\", true) == 0 || strcmp(cmd, \"/gbalance\", true) == 0) {
new gang;
if(strcmp(cmd, \"/gbalance\", true) == 0)
gang = 1;
if(IsPlayerInCheckpoint(playerid) == 0 || getCheckpointType(playerid) != CP_BANK) {
SendClientMessage(playerid, COLOR_YELLOW, \"Ez nem Bank.\");
return 1;
}
if(gang && playerGang[playerid]==0) {
SendClientMessage(playerid, COLOR_RED, \"Nem vagy Bandába!\");
return 1;
}
if(gang)
{
new query17[500],line[500];
format(query17, sizeof(query17), \"SELECT * FROM `gangs` WHERE `id` = \'1\' \",playerGang[playerid]);
mysql_query(query17);
mysql_store_result();
mysql_fetch_row(line);
sscanf(line, \"p<|>ds[128]s[128]dddd\",0,0,0,0,0,gangBank[playerGang[playerid]],0);
format(string, sizeof(string), \"banda számla: $%d van a bankba.\", gangBank[playerGang[playerid]]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else
{
format(string, sizeof(string), \"Számla összeged: $%d van a bankba.\",PlayerInfo[playerid][pBank]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
return 1;
}
mysql rész a hiábs de miért nem jó??
ja és az id az 1 es:)