/suggest command
#6

Command finished If you need the code:
pawn Код:
CMD:suggest(playerid, params[])
{
    if (isnull(params)) return SendClientMessage(playerid,-1,#Syntax /suggest <suggestion>);

    new
        _msg[ 128 ],
        _msg2[ 128 ],
        player_name[ MAX_PLAYER_NAME ];

    GetPlayerName(playerid, player_name, MAX_PLAYER_NAME);

    format( _msg, sizeof ( _msg ), "Name: %s\r\n", player_name);
    format( _msg2, sizeof( _msg2), "Suggestion: %s\r\n",params);

    new File: fileToWrite = fopen("suggestions.txt", io_append);
    fwrite(fileToWrite,"[New Suggestion]\r\n");
    fwrite(fileToWrite, _msg);
    fwrite(fileToWrite, _msg2);
    fclose(fileToWrite);
    return 1;
}
Reply


Messages In This Thread
/suggest command - by DaRkAnGeL[NBK] - 10.11.2011, 15:29
Re: /suggest command - by SmiT - 10.11.2011, 15:39
Re: /suggest command - by A7X_CEEJAY - 10.11.2011, 15:41
Re: /suggest command - by DaRkAnGeL[NBK] - 10.11.2011, 15:46
Re: /suggest command - by AdamCooper - 10.11.2011, 16:07
Re: /suggest command - by DaRkAnGeL[NBK] - 10.11.2011, 16:13

Forum Jump:


Users browsing this thread: 1 Guest(s)