30.08.2018, 15:20
First thing i will say, you must set UserStats[playerid][Clan] by default value to -1 because 0 can be a valid clan id, then in your code:
PHP код:
case 4:
{
if(UserStats[playerid][Clan]=>0)
{
new string[100];
format(string, sizeof(string), "%s", ClanInfo[UserStats[playerid][Clan]][ClanName]);
GameTextForPlayer(playerid, string, 1000, 4);
//you must have loaded all clan names before somewhere
}
else
{
GameTextForPlayer(playerid, "~r~YOU ARE NOT IN A CLAN", 1000, 4);
return 0; //prevents the player from spawning
}
}