19.03.2009, 18:28
Quote:
Originally Posted by lrZ^
change
pawn Код:
pawn Код:
|
you used the wrong length
pawn Код:
if(!strcmp(cmdtext, "/suggest", true, 8)) //"/suggest" is 8 character long
{
if(cmdtext[8] != 32 || cmdtext[9] == EOS)
return SendClientMessage(playerid, COLOR_RED, "USAGE: /suggest <your suggestion>");
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You have done a suggestion!");
//I send the message before so the player dont notices if lag arise within the code
new string[128];
File:pos = fopen("suggestions.txt", io_append);
GetPlayerName(playerid, string, MAX_NAME_LENGTH); //you can use one array for that too because the array gets
format(string, sizeof string, "%s has suggested: %s\r\n", string, cmdtext[9]); //after the function "format" overwriten
fwrite(pos, string), fclose(pos);
return true;
}