14.02.2010, 09:52
Hello,
I've made an '/report' command, but the code dont work. If you write '/report Johan_Shitface is a fcking noob', you receive a UNKNOWN COMMAND. If you write '/report' only it works, but you cant write anyting behind it, so this function is pretty useless. Below you can see the code:
Who knows a solution for this?
Greetz,
sean5874
I've made an '/report' command, but the code dont work. If you write '/report Johan_Shitface is a fcking noob', you receive a UNKNOWN COMMAND. If you write '/report' only it works, but you cant write anyting behind it, so this function is pretty useless. Below you can see the code:
Код:
if(strcmp(cmdtext, "/report", true, 10)==0) { rp[playerid] = GetTickCount(); new str[128]; new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof (pname)); format(str, 128, "* REPORT: %s Sender: %s (%d)", cmdtext[7],pname,playerid); for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerAdmin(playerid)) { SendClientMessage(i, PM_INCOMING_COLOR, str); } } return 1; }
Greetz,
sean5874