/report command???
#4

pawn Код:
COMMAND:report(playerid,params[]) {
    new
        name1[30],
        name2[30],
        id,
        text[128],
        reason[50];
    if(sscanf(params,"us",id,reason))
        return SendClientMessage(playerid,red,"USAGE: /report [id] [reason]");
    if(IsPlayerConnected(id)) {
        SendClientMessage(playerid,yellow,"Your report has been sent to online admins.");
        for(new i = 0; i < MAX_PLAYERS; ++i) {
            if(IsPlayerConnected(i) && !IsPlayerNPC(i) && IsPlayerAdmin(i)) {
            GetPlayerName(playerid,name1,sizeof(name1));
            GetPlayerName(id,name2,sizeof(name2));
            new Hour,Minute,Second;
            gettime(Hour,Minute,Second);
            format(text,sizeof(text),"|| %d:%d:%d || [Report] | \"%s\" [%i] has reported \"%s\" [%i], reason: %s.",Hour,Minute,Second,name1,playerid,name2,id,reason);
            SendClientMessage(i,COLOR_WHITE,text);
            }
        }
    } else {
        return SendClientMessage(playerid,red,"Invalid ID");
    }
    return 1;
}
This should work

EDIT: you need to define COLOR_WHITE...
Reply


Messages In This Thread
/report command??? - by sciman001 - 23.04.2011, 03:17
Re: /report command??? - by Tommy_Mandaz - 23.04.2011, 03:18
Re: /report command??? - by sciman001 - 23.04.2011, 03:26
Re: /report command??? - by Seven_of_Nine - 23.04.2011, 05:59

Forum Jump:


Users browsing this thread: 1 Guest(s)