Sending success message back
#1

Not sure if the topic says its name but

What I mean is when a admin does a command it sends him a message back with a sendclientmessage that he did that to a player for example:

I have a freeze command but I want to add a sendclientmessage back to the admin saying he successfully frozen this player, which I do think should look like
pawn Код:
format( str, sizeof ( str ),"[SUCCESS] You have frozen %s successfully);
    SendClientMessage( playerid, COLOR_LIGHTGREEN -1, str );
and than back one in unmute command, (not sure about the format just a rough thing what I think it would look like.)
Here is the command its self:
pawn Код:
COMMAND:freeze(playerid, params[])
{
    if (MasterAccount[playerid][mSuperAdmin] || Character[playerid][cAdminLevel] >= 1)
    if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "[SYNTAX]: : /freeze [playerid]");
    if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: Invalid player id");
    if(IsFrozen[playerb]) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: Player is already frozen.");
    IsFrozen[playerb] = 1;
    GetPlayerPos(playerb, FX[playerb], FY[playerb], FZ[playerb]);
    SendClientMessage(playerb, COLOR_RED, "[INFO]: You have been frozen!");
    return 1;
}
Anyone could explain to me how to do it?

Thanks a bunch
Reply


Messages In This Thread
Sending success message back - by iNorton - 23.10.2011, 23:45
Re: Sending success message back - by grand.Theft.Otto - 23.10.2011, 23:58
Re: Sending success message back - by iNorton - 24.10.2011, 00:04
Re: Sending success message back - by grand.Theft.Otto - 24.10.2011, 00:11
Re: Sending success message back - by iNorton - 24.10.2011, 00:14

Forum Jump:


Users browsing this thread: 2 Guest(s)