12.12.2014, 15:19
So, I made a suggestion filterscript.
A problem it's, because when I use command if it's more characters than 5 it's show me 'Unknow Error', but if it's less than 5 characters, then it's works fine, but in file, it's showin' me something like:
What's wrong in code?
EDIT: Because I made this thread, I want to know how many filterscripts you can have in 'filescripts' folder and in 'server.cfg'. There it's a limit, or not?
+Rep for helper.
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>
#include <YSI\y_ini>
#define PATH "/Sugestii/%s.ini"
stock SugPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername);
return string;
}
CMD:sugestie(playerid, params[])
{
new Suggestion;
if(sscanf(params,"s", Suggestion)) return SendClientMessage(playerid, -1, "{FFCC33}Folosire: {15FF00}/Sugestie [Sugestie]");
new INI:File = INI_Open(SugPath(playerid));
INI_SetTag(File,"Sugestii");
INI_WriteInt(File,"Sugestie: ", Suggestion);
INI_Close(File);
SendClientMessage(playerid, -1, "{FFCC33}Sugestia ta a fost trimisă owner-ului: {FF0000}Teddy {FFCC33}. Vă multumim!");
return 1;
}
pawn Код:
[Sugestii]
Sugestie: = 68;
Sugestie: = 68;
Sugestie: = 68;
EDIT: Because I made this thread, I want to know how many filterscripts you can have in 'filescripts' folder and in 'server.cfg'. There it's a limit, or not?
+Rep for helper.