19.01.2018, 07:46
here an string returns...
how can i compare the string?
plz help me to check the return string value
how can i compare the string?
Code:
if(GetPlayerClanRank(playerid)=="Owner") { return 1; }
PHP Code:
stock GetPlayerClanRank(playerid)
{
new player_name[MAX_PLAYER_NAME];
GetPlayerName(playerid,player_name,sizeof(player_name));
new rank[100];
new clanquery[100];
new Cache:count;
mysql_format(gSQL,clanquery, sizeof(clanquery), "SELECT playerclanrank FROM Clan_Members WHERE playername = '%s'", player_name);
count = mysql_query(gSQL,clanquery);
cache_get_value_name(0,"playerclanrank",rank);
cache_delete(count);
return rank;
}