21.06.2015, 11:06
what about this: new teamname[24];
just add new column in database called Team and u can load it on login and store it to gTeam
PHP код:
if(gTeam[playerid] == COPS) teamname = "Cop";
if(gTeam[playerid] == ARMY) teamname = "Army";
if(gTeam[playerid] == FBI) teamname = "FBI";
if(gTeam[playerid] == CIA) teamname = "CIA";
if(gTeam[playerid] == CIVILIANS) teamname = "Civilian";
mysql_format(MySQLCon, query, sizeof(query), "UPDATE `players` SET `Team`=%s WHERE `ID`=%d AND user='%e'", teamname, pInfo[playerid][pID], PlayerName(playerid));
mysql_tquery(MySQLCon, query, "", "");
PHP код:
GetPlayerTeamName(playerid)
{
new teamname[24];
if(gTeam[playerid] == COPS) teamname = "Cop";
if(gTeam[playerid] == ARMY) teamname = "Army";
if(gTeam[playerid] == FBI) teamname = "FBI";
if(gTeam[playerid] == CIA) teamname = "CIA";
if(gTeam[playerid] == CIVILIANS) teamname = "Civilian";
new name[24];
format(name, sizeof name, "%s", teamname);
return name;
}