05.03.2018, 16:37
(
Последний раз редактировалось Unrea1; 06.03.2018 в 18:03.
Причина: Error in code, fixed
)
Please, don't abuse of the 'stocks', read more of this in: https://sampforum.blast.hk/showthread.php?tid=570635
Replace old function with this.
I recommend analyzing the functions so that you can learn, search the forum for tutorials on the use of the switch, it is really useful and fast compared to if
Replace old function with this.
PHP код:
GetPlayerTeamName(playerid)
{
new szString[24];
switch(GetPlayerTeam(playerid))
{
case TEAM_USA: szString = "United States";
case TEAM_CANADA: szString = "Canada";
case TEAM_BRITAIN: szString = "Britain";
case TEAM_AUSTRALIA: szString = "Australia";
case TEAM_RUSSIA: szString = "Russia";
case TEAM_GERMANY: szString = "Germany";
case TEAM_ITALY: szString = "Italy";
case TEAM_FRANCE: szString = "France";
case TEAM_CHINA: szString = "China";
case TEAM_INDIA: szString = "India";
}
return szString;
}