Need an Easy Fs
#9

Quote:
Originally Posted by Cardinaal
Hey sorry for posting in this old topic.
I tried to use that script.
It saves alright.
The problem is when i type: /suggest.. It replies Suggestion Sent! and saves a empy suggestion in suggestions.txt
but when i type /suggest Better streamer(example) it replies: USAGE: /suggest [text].
I don't know how to fix that, sorry.
It should reply: USAGE /suggest [text] if you type only /suggest
But now it replies USAGE /suggest [text] if you type /suggest You need this bla bla bla
Help please?

Here is a perfect one without any errors. Also, It posts the players name and the IP of the player who /suggest a command so if they abuse it, you can warn them about it.

Code:
if(strcmp(cmd, "/suggest", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_BLUE, "USAGE: /suggest [text]");
return 1;
}
new ip[16]; GetPlayerIp(playerid, ip, sizeof(ip));
format(szstring, sizeof(szstring), "name: %s, IP: %s, Suggestion: %s.",sendername,ip,(result));
SendClientMessage(playerid, COLOR_YELLOW, szstring);
Suggestions(szstring);
}
return 1;
}
Reply


Messages In This Thread
Need an Easy Fs - by MarcoNecroX - 08.05.2009, 19:18
Re: Need an Easy Fs - by ICECOLDKILLAK8 - 08.05.2009, 19:24
Re: Need an Easy Fs - by MarcoNecroX - 08.05.2009, 19:39
Re: Need an Easy Fs - by [nl]daplayer - 08.05.2009, 19:56
Re: Need an Easy Fs - by MarcoNecroX - 08.05.2009, 21:45
Re: Need an Easy Fs - by JaYmE - 08.05.2009, 22:00
Re: Need an Easy Fs - by MarcoNecroX - 08.05.2009, 23:11
Re: Need an Easy Fs - by Cardinaal - 10.04.2010, 18:32
Re: Need an Easy Fs - by ruckfules99 - 10.04.2010, 18:45
Re: Need an Easy Fs - by Cardinaal - 10.04.2010, 18:59

Forum Jump:


Users browsing this thread: 2 Guest(s)