Command Help.
#1

pawn Код:
//Hai



#include <a_samp>

#define COLOR_YELLOW         0xFFFF00AA
#define FILTERSCRIPT
#include sscanf2
#include zcmd
#define RED 0xFF0000AA

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);
    SendClientMessageToAdmins(COLOR_YELLOW, str); //change this to yours!
    return true;
}
stock SendClientMessageToAdmins(color, text[])
{
    for(new a, g = GetMaxPlayers(); a < g; a++)
        if(IsPlayerConnected(a) && IsPlayerAdmin(a))
            SendClientMessage(a, color, text);
}
Reply


Messages In This Thread
Command Help. - by Alex_Obando - 21.05.2011, 00:33
Re: Command Help. - by grand.Theft.Otto - 21.05.2011, 00:36
Respuesta: Command Help. - by Alex_Obando - 21.05.2011, 00:40
Re: Command Help. - by grand.Theft.Otto - 21.05.2011, 01:20
Re: Command Help. - by Laronic - 21.05.2011, 01:35
Respuesta: Command Help. - by Alex_Obando - 21.05.2011, 03:48
Respuesta: Command Help. - by Alex_Obando - 21.05.2011, 13:05
Re: Command Help. - by wheelman_WM - 21.05.2011, 13:08
Respuesta: Command Help. - by Alex_Obando - 21.05.2011, 13:11

Forum Jump:


Users browsing this thread: 2 Guest(s)