Help me - Scriptfiles.
#1

Hello. No one will help me. I make this FS, but it doesnґt work. When I type /bug or /sug and [REASOn], the reason will save in the scriptfiles folder at "Bugs" and "Suggestions".

Can anyone help me

pawn Код:
dcmd(bug,3,cmdtext);
dcmd(sug,3,cmdtext);
pawn Код:
dcmd_bug(playerid,params[])
{
    new string[128],bug,pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    if(sscanf(params,"s[128]",bug)) return SendClientMessage(playerid, COLOR_RED,"USAGE: /bug [what's the bug ?]");
    format(string,sizeof string,"[BUG REPORT] - %s has reported this bug: %s.",pName,bug);
    SaveInFile("Bugs.txt",string);
    format(string,sizeof string,"[BUG REPORT] - You've reported this bug: %s ; succesfully.",bug);
    SendClientMessage(playerid,COLOR_GREEN,string);
    return 1;
}
dcmd_sug(playerid,params[])
{
    new string[128],pName[MAX_PLAYER_NAME],sug;
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    if(sscanf(params,"s[128]",sug)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /sug [suggestion for the server]");
    format(string,sizeof string,"[NEW SUGGESTION] - %s has suggested: %s.",pName,sug);
    SaveInFile("Suggestions.txt",string);
    format(string,sizeof string,"[NEW SUGGESTION] - Your suggestion has been saved in a file; You have succesfully suggested: %s",sug);
    SendClientMessage(playerid,COLOR_GREEN,string);
    return 1;
}
It is correct ?
Reply


Messages In This Thread
Help me - Scriptfiles. - by Edin Black - 15.05.2012, 16:01
Re: Help me - Scriptfiles. - by doreto - 15.05.2012, 16:05
Re: Help me - Scriptfiles. - by ViniBorn - 15.05.2012, 16:11
AW: Help me - Scriptfiles. - by Edin Black - 15.05.2012, 16:25
Re: Help me - Scriptfiles. - by mgd - 15.05.2012, 16:57
Re: Help me - Scriptfiles. - by TheDominator - 15.05.2012, 16:58
AW: Help me - Scriptfiles. - by Edin Black - 15.05.2012, 17:02
Re: Help me - Scriptfiles. - by HaZaRaS™ - 15.05.2012, 17:02
AW: Help me - Scriptfiles. - by Edin Black - 15.05.2012, 17:05
Re: Help me - Scriptfiles. - by mgd - 15.05.2012, 17:09

Forum Jump:


Users browsing this thread: 1 Guest(s)