17.08.2009, 20:02
Hello, I just made my new server and I would like to script /report cmd.
I write in pawno this for code:
if (strcmp(cmd, "/report id reason ") == 0)
{
if (strlen(cmdtext) >
{
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "Report from %s(%d): %s", playername, playerid, cmdtext[8]);
SendMessageToAdmins(string);
format(string, sizeof(string), "Report sent to currently online admins.");
SendMessage(playerid, string);
}
else {
format(string, sizeof(string), "Usage: /report id <text to send>");
SendMessage(playerid, string);
}
return 1;
What is wrong with him, I save it and start my server, I write /report id reason and "SEERVER: Unaknown command"
Please help?
I write in pawno this for code:
if (strcmp(cmd, "/report id reason ") == 0)
{
if (strlen(cmdtext) >
{
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "Report from %s(%d): %s", playername, playerid, cmdtext[8]);
SendMessageToAdmins(string);
format(string, sizeof(string), "Report sent to currently online admins.");
SendMessage(playerid, string);
}
else {
format(string, sizeof(string), "Usage: /report id <text to send>");
SendMessage(playerid, string);
}
return 1;
What is wrong with him, I save it and start my server, I write /report id reason and "SEERVER: Unaknown command"
Please help?