Problem CMD
#3

Quote:
Originally Posted by Private200
View Post
It's your sscanf that makes your command work as "giveleaderorg 45 0", check: https://sampforum.blast.hk/showthread.php?tid=602923

It won't show the list because most likely, you are putting a valid player id?
I think so. The command works nicely and gives me the leader of the organization only I do not know what's going on in this code what I showed. It does not show me messages, for example SendClientMessage(playerid, -1, "================ LIST OF LEADERS ================");
Code:
    else
    {
        SendClientMessage(playerid, -1, "================ LIST OF LEADERS ================");

        format(str, 128, "SELECT `Nick` FROM `accounts` WHERE `FMember`='%d' AND `Rank`>1000", family);
        mysql_query(g_SQL, str);

        new nick[24];
        new results = cache_num_rows();

		if(results > 0)
		{
			for(new i = 0; i < results; i++)
			{
				cache_get_value_name(i, "Nick", nick);

            	sscanf(str, "p<|>s[24]", nick);

            	SendClientMessage(playerid, -1, nick);
        	}
        	SendClientMessage(playerid, -1, "================ END ================");
        }
    }
Reply


Messages In This Thread
Problem CMD - by KamilPolska - 06.04.2019, 15:02
Re: Problem CMD - by Private200 - 06.04.2019, 15:32
Re: Problem CMD - by KamilPolska - 06.04.2019, 17:29
Re: Problem CMD - by KamilPolska - 06.04.2019, 17:34
Re: Problem CMD - by TheToretto - 06.04.2019, 19:07
Re: Problem CMD - by KamilPolska - 07.04.2019, 01:47

Forum Jump:


Users browsing this thread: 2 Guest(s)