01.07.2014, 16:49
Hi, I am kind of having a problem with pTeam when I use it to display the team name on stats. If I use %s for the string, it gives me a blank sentence only saying Team:
If I use %d it gives me the number used to define the team.
My code.
if(IsPlayerConnected(playerid))
{
new team = pTeam[playerid];
new str[500];
format(string,sizeof(string),"Team: %s", team);
SendClientMessage(playerid, -1, string);
}
return 1;
I am using a Y_Ini system to save the teams, and it only works if I use pTeam[playerid] in the info.
such as this
INI_Int("Team",pTeam[playerid]);
Now my team defines.
#define TEAM_R 1
#define TEAM_CIVILIANS 2
#define TEAM_REBELS 3
#define TEAM_ARMY 4
How would I make it display the names instead of the numbers?
If I use %d it gives me the number used to define the team.
My code.
if(IsPlayerConnected(playerid))
{
new team = pTeam[playerid];
new str[500];
format(string,sizeof(string),"Team: %s", team);
SendClientMessage(playerid, -1, string);
}
return 1;
I am using a Y_Ini system to save the teams, and it only works if I use pTeam[playerid] in the info.
such as this
INI_Int("Team",pTeam[playerid]);
Now my team defines.
#define TEAM_R 1
#define TEAM_CIVILIANS 2
#define TEAM_REBELS 3
#define TEAM_ARMY 4
How would I make it display the names instead of the numbers?