Need help with idx
#3

Do NOT use strtok for that. Use sscanf for parameters, though in your case is not needed.

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;
}
Assuming string and sendername are declared as global according to your command.
Reply


Messages In This Thread
Need help with idx - by D3vin - 09.11.2013, 18:15
Re: Need help with idx - by DanishHaq - 09.11.2013, 18:18
Re: Need help with idx - by Konstantinos - 09.11.2013, 18:21
Re: Need help with idx - by D3vin - 09.11.2013, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)