#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFFAA00AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GRAY COLOR_GREY //for those who prefer using COLOR_GRAY instead of COLOR_GREY)
CMD:me(playerid, params[])
{
new pName[25], str[128];
if(!strlen(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
GetPlayerName(playerid, pName, 25);
format(str, 128, "%s %s", pName, str);
SendClientMessageToAll(COLOR_YELLOW, str);
return 1;
}
CMD:do(playerid, params[])
{
new pName[25], str[128];
if(!strlen(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /do [action]");
GetPlayerName(playerid, pName, 25);
format(str, 128, "%s (( %s ))", str, pName);
SendClientMessageToAll(COLOR_ORANGE, str);
return 1;
}
// Global variable. Don't put it in a command, callback or function. Place it below the defines and includes
new bool:kMuted[MAX_PLAYERS];
// Put this on OnPlayerConnect
kMuted[strval(params[0])] = false;
// Put this in OnPlayerText
if(kMuted[playerid]){
SendClientMessage(playerid, COLOR_RED, "ERROR: You are muted!");
return 0;
}
// The command
CMD:mute(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON admin!");
if(!strlen(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mute [playerid]");
if(!IsPlayerConnected(strval(params[0]))) return SendClientMessage(playerid, COLOR_RED, "ERROR: Given player ID not connected");
if(kMuted[strval(params[0])]){
kMuted[strval(params[0])] = false;
SendClientMessage(playerid, COLOR_GREEN, "* The player has been unmuted.");
SendClientMessage(strval(params[0]), COLOR_GREEN, "* You have been unmuted by an administrator.");
}
else{
kMuted[strval(params[0])] = true;
SendClientMessage(playerid, COLOR_GREEN, "* The player has been muted.");
SendClientMessage(strval(params[0]), COLOR_RED, "* You have been muted by an administrator!");
}
return 1;
}
CMD:explode(playerid, params[])
{
new Float:pPos[3];
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON administrator.");
if(!IsPlayerConnected(strval(params[0]))) return SendClientMessage(playerid, COLOR_RED, "ERROR: Given player ID is not online");
GetPlayerPos(strval(params[0]), pPos[0], pPos[1], pPos[2]);
CreateExplosion(pPos[0], pPos[1], pPos[2], 11, 1.5);
SendClientMessage(playerid, COLOR_GREEN, "* Player has been exploded");
return 1;
}
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
|
/do [action example: /do knocks him out do i succes?] and it will look like this: (knocks him out do i succes?(justsomeguy))
CMD:me(playerid, params[])
{
new pName[MAX_PLAYER_NAME], str[128];
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
GetPlayerName(playerid, pName, sizeof(pName));
format(str, sizeof(str), "%s %s", pName, params);
SendClientMessageToAll(COLOR_YELLOW, str);
return 1;
}
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
|
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
|
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
|
Nice, but please use something like a Distance Detector, that checks how far away are nother players from the /me-CMD User, not everyone want that the Message goes to all Users from Los Santos to Bayside
|
CMD:announce(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON admin!");
if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"/ANNOUNCE [TEXT]");
GameTextForAll(params,5000,4);
return 1;
}
CMD:clearchat(playerid,params[])
{
#pragma unused params
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON admin!");
new string[128];
for(new b = 0; b < 13; b++)
{
SendClientMessageToAll(COLOR_RED," ");
}
return 1;
}