Bugs and Suggestions.
#1

Hello guys. I need help.

Can anyone make me a command, when I type /bug [Reason], this came into the scriptfiles "bugs".

Or when I type Suggestion, the reason came into scriptfiles "Suggestions".

Rep++

Please I need this.

The command in: strcmp
Reply
#2

Guys, can anyone make me this ?

Hmm, I make it alone. And then Iґll paste it here.
Reply
#3

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
#4

pawn Код:
C:\Users\E\Desktop\Nove FS\Kapica.pwn(4) : error 001: expected token: ";", but found "("
C:\Users\E\Desktop\Nove FS\Kapica.pwn(5) : error 021: symbol already defined: "dcmd"
C:\Users\E\Desktop\Nove FS\Kapica.pwn(29) : warning 203: symbol is never used: "dcmd"
C:\Users\E\Desktop\Nove FS\Kapica.pwn(29) : warning 203: symbol is never used: "dcmd_bug"
C:\Users\E\Desktop\Nove FS\Kapica.pwn(29) : warning 203: symbol is never used: "dcmd_sug"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)