Idea Box - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Idea Box (
/showthread.php?tid=96040)
Idea Box -
kokkie20 - 06.09.2009
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
Re: Idea Box -
Zezombia - 06.09.2009
[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!");
}
Re: Idea Box -
Abernethy - 06.09.2009
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.
Re: Idea Box -
kokkie20 - 06.09.2009
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
Re: Idea Box -
kokkie20 - 06.09.2009
its ok

have fun with the idea ^^