Report System
#1

Report System With strcmp?
Reply
#2

Here ya are(not very advanced since i dont know your script)
Код:
if(!strcmp(cmdtext, "/report", true, 3)) 
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /report [player name] [reason]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "[Report]: (from %s) %s", str, cmdtext[4]);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
    }
Reply
#3

Quote:
Originally Posted by [NRP]Blade
Посмотреть сообщение
Here ya are(not very advanced since i dont know your script)
Код:
if(!strcmp(cmdtext, "/report", true, 3)) 
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /report [player name] [reason]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "[Report]: (from %s) %s", str, cmdtext[4]);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
    }
I dont think that is gonna work very well....lol
Reply
#4

Alex, I've two things to say to you.

First, stop asking for stuff to be made for you. Look on the wiki and learn to make it yourself.

Second, don't bother learning with strcmp, it's old for commands. Learn off of ZCMD/DCMD and sscanf. If you do, it will also be much easier for you to get help in the sa-mp community, I believe more people know ZCMD & sscanf than strcmp.

The functions in zcmd and sscanf are much more advanced than strcmp and all the old functions.
Reply
#5

lol it displays the message as:
Код:
[Report]: (from Brandon_Foster) brandon meta-gaming
if you typed /report brandon meta-gaming(XD)
Reply
#6

@Antonio could you point me to some good tutorials as i am trying to learn zcmd?
Reply
#7

https://sampforum.blast.hk/showthread.php?tid=234512 This topic should help.

and Antonio, I find strcmp easier lol. It works the same and it's easier.
Reply
#8

Quote:
Originally Posted by [NRP]Blade
Посмотреть сообщение
lol it displays the message as:
Код:
[Report]: (from Brandon_Foster) brandon meta-gaming
if you typed /report brandon meta-gaming(XD)
No, it doesn't. You used 'cmdtext[4]' which would only do '/rep'. Basically, you failed.
Reply
#9

lol didnt notice tht , sry i used a premade cmd
Reply
#10

The supplier of this code snippet scripts for cash.....
Anyone in line for to pay for his skills?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)