09.11.2013, 18:21
Do NOT use strtok for that. Use sscanf for parameters, though in your case is not needed.
Assuming string and sendername are declared as global according to your command.
pawn Код:
CMD:reportbug(playerid, params[])
{
if(PlayerInfo[playerid][pBugMuted] == 1) return SendClientMessage(playerid, COLOR_GREY, " You are banned from using /reportbug ! ");
if(JustBugReported[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, " Wait 20 seconds after sending a next bug report ! ");
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /reportbug [text]");
strmid(sendername, PlayerRPName(playerid), 0, MAX_PLAYER_NAME);
JustBugReported[playerid] = 1;
SetTimerEx("BugReportReset", 20000, false, "i", playerid);
format(string, sizeof(string), "Bug Report From [%d]%s: %s",playerid, sendername, params);
SendTesterMessage(SCOLOR_GREEN, string);
SendClientMessage(playerid, COLOR_YELLOW, "Your bug report message was sent to the online testers, thank you.");
return 1;
}

