18.05.2016, 03:35
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..
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; }