31.08.2009, 14:18
Iґve tried it alone but get a bunch of errors, whats wrong here?
Code:
if(strcmp(cmd, "/irc", true) == 0) // Available for everyone: reports a player to the admins { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, ORANGE, "USAGE: /irc [text]"); SendClientMessage(playerid, ORANGE, "FUNCTION: Will send a message to the online admins"); return 1; } new targetid = ReturnUser(tmp); if(targetid != INVALID_PLAYER_ID) { GetPlayerName(playerid, sendername, sizeof(sendername)); new reason[128]; reason = bigstrtok(cmdtext, idx); if(!strlen(reason)) return SendClientMessage(playerid, ORANGE, "USAGE: /irc [text]"); format(string, sizeof(string), "|- %s on IRC: %s ]", sendername,giveplayername,reason); SendClientMessageToAdmins(ADMIN_RED, string,1); format(string, sizeof(string), "Your message has been sent to the online admins.", giveplayername); SendClientMessage(playerid, GREEN, string); return 1; }