23.10.2011, 23:45
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
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:
Anyone could explain to me how to do it?
Thanks a bunch
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 );
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;
}
Thanks a bunch