VIP CMD error
#5

You shouldn't use sscanf when you only want to use the params as a string, and especially not a string with 300 cells. And you shouldn't create two different strings if you only want to use 1 at a time.
Recycle the same one (Not sure if that's the correct term but meh)

SendClientMessage can only show 128 characters, why would you even need a string with 350 cells..

Код:
CMD:v(playerid, params[])
{
	if(GetPVarInt(playerid, "DonateRank") >= 1)
	{
		if (isnull(params)) SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /v text");
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(GetPVarInt(i, "DonateRank") >= 1)
				{
					new str[128];
					format(str, sizeof(str), "[VIP CHAT] %s Says: %s", GetName(playerid), params);
					SendClientMessage(i, 0xFFFFFFFF, str);
				}
			}
		}
	}
	else SendClientMessage(playerid, 0xFFFFFFFF, "You dont have any donator rank");
	return 1;
}
Reply


Messages In This Thread
VIP CMD error - by LifeRah - 18.05.2016, 02:46
Re: VIP CMD error - by 1fret - 18.05.2016, 02:55
Re: VIP CMD error - by Noris - 18.05.2016, 02:58
Re: VIP CMD error - by tboysamp - 18.05.2016, 03:07
Re: VIP CMD error - by Stinged - 18.05.2016, 03:35
Re: VIP CMD error - by LifeRah - 18.05.2016, 12:04

Forum Jump:


Users browsing this thread: 3 Guest(s)