Idea Box
#1

Hello, i am looking for a script
Its a idea box script.
I am looking that if a player type: /idea
that they can input a idea for the server as example:
/idea [more dm teleports]
that it saves in a .txt file, but also that it saves the playername with it.
can someone help me with this?
thanks
Reply
#2

[HLF]Southclaw, sarcasm fails on the internet.

Kokkie20, try this:

pawn Код:
if(strcmp(cmdtext, "/idea", true, 5) == 0)
{
    if(strlen(cmdtext[6]) == 0) return SendClientMessage(playerid, 0xFFFFFF, "Usage: /idea [your idea]");

    new File:file, string[128];
    format(string, sizeof(string), "%s\r\n", cmdtext[6]);

    file = fopen("ideas.txt", io_append);
    fwrite(file, string);
    fclose(file);

    return SendClientMessage(playerid, 0xFFFFFF, "Your idea has been saved!");
}
Reply
#3

Quote:
Originally Posted by Zezombia
[HLF]Southclaw, sarcasm fails on the internet.

Kokkie20, try this:

pawn Код:
if(strcmp(cmdtext, "/idea", true, 5) == 0)
{
    if(strlen(cmdtext[6]) == 0) return SendClientMessage(playerid, 0xFFFFFF, "Usage: /idea [your idea]");

    new File:file, string[128];
    format(string, sizeof(string), "%s\r\n", cmdtext[6]);

    file = fopen("ideas.txt", io_append);
    fwrite(file, string);
    fclose(file);

    return SendClientMessage(playerid, 0xFFFFFF, "Your idea has been saved!");
}
Eh, i think he was serious.
Reply
#4

Quote:
Originally Posted by [HLF
Southclaw ]
yeh! sure i'll do that! it's a pretty good idea! i'll probably use it on my server, with your permission of course
sure u can use it
Quote:
Originally Posted by Zezombia
[HLF]Southclaw, sarcasm fails on the internet.

Kokkie20, try this:

pawn Код:
if(strcmp(cmdtext, "/idea", true, 5) == 0)
{
    if(strlen(cmdtext[6]) == 0) return SendClientMessage(playerid, 0xFFFFFF, "Usage: /idea [your idea]");

    new File:file, string[128];
    format(string, sizeof(string), "%s\r\n", cmdtext[6]);

    file = fopen("ideas.txt", io_append);
    fwrite(file, string);
    fclose(file);

    return SendClientMessage(playerid, 0xFFFFFF, "Your idea has been saved!");
}
thanks, i'll change a little thing, but it works
thanks
Quote:
Originally Posted by Abernethy
Quote:
Originally Posted by Zezombia
[HLF]Southclaw, sarcasm fails on the internet.

Kokkie20, try this:

pawn Код:
if(strcmp(cmdtext, "/idea", true, 5) == 0)
{
    if(strlen(cmdtext[6]) == 0) return SendClientMessage(playerid, 0xFFFFFF, "Usage: /idea [your idea]");

    new File:file, string[128];
    format(string, sizeof(string), "%s\r\n", cmdtext[6]);

    file = fopen("ideas.txt", io_append);
    fwrite(file, string);
    fclose(file);

    return SendClientMessage(playerid, 0xFFFFFF, "Your idea has been saved!");
}
Eh, i think he was serious.
i dont know if he was serious but he can use it if he want
Reply
#5

its ok
have fun with the idea ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)