22.09.2017, 08:20
so iv got an pm command
the problem is that the message be like PM FROM name: hi hru bro what ar
and the command cut off at Are o how can I fix it I tried to make the array bigger but didn't work
PHP код:
CMD:pm(playerid, params[])
{
new tmp[1080], giveplayerid, giveplayer[25], playername[25],string[1080];
if(adlvl[playerid] < 2 && !vipmember[playerid] && helper[playerid] == 0) return 0;
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
if (sscanf(params, "us", giveplayerid, tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /pm [playerid] [message]");
if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_RED, "Error: Inactive player id!");
if (giveplayerid == playerid) return SendClientMessage(playerid, COLOR_RED, "Error: You can't send private message to your self!");
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME);
format(string, sizeof(string), "{E6E600}PM from %s(%d): %s", playername, playerid, tmp);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string,sizeof(string), "{FFFF00}PM to %s(%d): %s", giveplayer, giveplayerid, tmp);
SendClientMessage(giveplayerid, COLOR_YELLOW, "You can use /pmr [message] for fast reply.");
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
and the command cut off at Are o how can I fix it I tried to make the array bigger but didn't work