Command
#1

Solved.
Reply
#2

Bump
Reply
#3

show me codes!
Reply
#4

Solved.
Reply
#5

Quote:
Originally Posted by SpiderWalk
Посмотреть сообщение
show me codes!


Anyway, why dont you use sscanf for it? and make it like:

pawn Код:
new id, reason[some string];
if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, red, "Usage: /report [id] [reason]");
//other code below.
Reply
#6

Can you make me a report system then?
I just need the reporter, the reported, and the reason.

Edit* You dont need to add the strock due I already have my sendclientmessagetoadmins strock.
Reply
#7

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Can you make me a report system then?
I just need the reporter, the reported, and the reason.

Edit* You dont need to add the strock due I already have my sendclientmessagetoadmins strock.
Here ya go:
pawn Код:
CMD:report(playerid, params[])
{
    new aName[MAX_PLAYER_NAME], str[128], reason, iD;
    if (sscanf(params, "dz", iD, reason)) return SCM(playerid, RED, "* Usage : /report [PlayerID/Name] [Reason]");
    if (iD == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "ERROR : Invaild PlayerID");
    if (playerid == iD) return SendClientMessage(playerid, RED, "ERROR : You cannot report yourself");
    GetPlayerName(iD, aName, sizeof(aName));
    format(str, sizeof(str), "%s(%d) has reported %s(%d) for : %s", pName(playerid), playerid, aName, iD, reason);
    SendAdminMessage(COLOR_YELLOW, str); //change this to yours!
    return true;
}
Reply
#8

Solved.
Reply
#9

You must include zcmd too

#include <zcmd>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)