Need help [/report command]
#1

Hey guys i am trying to make a /report cmd since past one week, I also searched samp forums but didn't got any help, Please i need a /report command for my server if anyone can send me the code it will be really appericated as i am looking for this command since one week, No Doubt i will also co operate with the one who wants to helps me



Regards,
Omer khan
Reply
#2

It's good of you that you've tried. Your code is probably not all too bad. Though, this section isn't for script requests, so unless you post your code, we can't help.
Reply
#3

Try following this script

http://pastebin.com/raw/KDz2mAjq



Reply
#4

Its easy, just format a string and send it to admins, and maybe a gametext "NEW REPORT"
Reply
#5

thnx for the help guys But i am trying to use this cmd and every time i try to compile it my pawno crashes

Код:
if(strcmp(cmd, "/report", true) == 0) 
    { 
        if(IsPlayerConnected(playerid)) 
        { 
            GetPlayerName(playerid, sendername, sizeof(sendername)); 
            new length = strlen(cmdtext); 
            while ((idx < length) && (cmdtext[idx] <= ' ')) 
            { 
                idx++; 
            } 
            new offset = idx; 
            new result[96]; 
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) 
            { 
                result[idx - offset] = cmdtext[idx]; 
                idx++; 
            } 
            result[idx - offset] = EOS; 
            if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [text]"); 
            format(string, sizeof(string), "Report from [%d]%s: %s",playerid, sendername, (result)); 
            ABroadCast(COLOR_LIGHTYELLOW,string,1); 
            SendClientMessage(playerid, COLOR_YELLOW, "Your report message was sent to online administrators, thank you."); 
        } 
        return 1; 
    }
Reply
#6

EDIT: hold on, let me rewrite that. I read it incorrectly.

Your way of handling command parameters is outdated. Take a look at sscanf and preferably also a command processor.

EDIT2: are you sure it's that command crashing the compiler? It compiles fine for me.
Reply
#7

Guys i am new to pawno thats why i can't handle common errors, I really need help at this
Reply
#8

Quote:
Originally Posted by OmerKhan
Посмотреть сообщение
Guys i am new to pawno thats why i can't handle common errors, I really need help at this
I edited my previous post:
Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
EDIT2: are you sure it's that command crashing the compiler? It compiles fine for me.
Reply
#9

Ye it Crashes every time and I'll provide anything to you, I just need some help
Reply
#10

Quote:
Originally Posted by OmerKhan
Посмотреть сообщение
Ye it Crashes every time and I'll provide anything to you, I just need some help
probably a brace issue try missing bracket finder and scan your code
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)