22.12.2013, 04:55
pawn Код:
COMMAND:finfo(playerid)
{
new c = 0;
if(PlayerInfo[playerid][playerteam] == CIV)
return SendClientError(playerid, "You cannot use this as civilian.");
SendClientMSG(playerid, COLOR_HELPEROOC, "{4985d7}[%s] -{a7c2e6} Faction Information", PlayerInfo[playerid][PTeamName]);
for(new iii = 0;iii < MAX_PLAYERS; iii++)
{
if(!IsPlayerConnected(iii)) continue;
if(PlayerInfo[iii][playerteam] == PlayerInfo[playerid][playerteam]) c++;
}
new query[550], savingstring[550];
new points, stock, gunss, members;
format(query, sizeof(query), "SELECT fpoints fguns fgunstock fmemberslots FROM TeamInfo WHERE Faction = '%s'",PlayerInfo[playerid][PTeamName]);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_field_row(savingstring, "fpoints");
points = strval(savingstring);
mysql_fetch_field_row(savingstring, "fguns");
gunss = strval(savingstring);
mysql_fetch_field_row(savingstring, "fgunstock");
stock = strval(savingstring);
mysql_fetch_field_row(savingstring, "fmemberslots");
members = strval(savingstring);
}
mysql_free_result();
mysql_query("SELECT playerteam FROM PlayerInfo WHERE playerteam=%d",PlayerInfo[playerid][playerteam]);
mysql_store_result();
new rows = mysql_num_rows();
mysql_free_result();
format(iStr, sizeof(iStr), " Members online: %d", c);
SendClientMessage(playerid, COLOR_WHITE, iStr);
if(PlayerInfo[playerid][playerteam] != LSPD && PlayerInfo[playerid][playerteam] != FBI && PlayerInfo[playerid][playerteam] != SASF && PlayerInfo[playerid][playerteam] != EMS)
{
format(iStr, sizeof(iStr), " F-Points: %d", points);
SendClientMessage(playerid, COLOR_WHITE, iStr);
format(iStr, sizeof(iStr), " F-Guns: %d", gunss);
SendClientMessage(playerid, COLOR_WHITE, iStr);
format(iStr, sizeof(iStr), " F-Gunstock: %d", stock);
SendClientMessage(playerid, COLOR_WHITE, iStr);
format(iStr, sizeof(iStr), " F-Vehicles: %d/%d", FactionCarCount(PlayerInfo[playerid][playerteam]), FactionCarMax(playerid));
SendClientMessage(playerid, COLOR_WHITE, iStr);
format(iStr, sizeof(iStr), " Maximum Members: %d", members);
SendClientMessage(playerid, COLOR_WHITE, iStr);
format(iStr, sizeof(iStr), " Total Members: %d", rows);
SendClientMessage(playerid, COLOR_WHITE, iStr);
}
else return SendClientError(playerid, CANT_USE_CMD);
//=============================================================================
return 1;
}
Код:
error 017: undefined symbol "gunss" error 017: undefined symbol "members" error 017: undefined symbol "gunss" error 017: undefined symbol "members"