dcmd_fakechat(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 5) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /fakechat [playerid] [text]");
new player1 = strval(tmp);
if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
CMDMessageToAdmins(playerid,"FAKECHAT");
SendPlayerMessageToAll(player1, params[strlen(tmp)+1]);
return SendClientMessage(playerid,blue,"Fake message sent");
} else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
} else return SendClientMessage(playerid,red,"Vocк nгo tem o Level suficiente para executar esse comando");
}
if(strcmp(cmd, "/mp", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /mp [ID] [Texto]");
return 1;
}
new ID;
ID = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF0000AA, "USO: /mp [ID] [Texto]");
return 1;
}
new Texto;
Texto = strval(tmp);
new Nome[MAX_PLAYER_NAME];
new String[128];
GetPlayerName(playerid, Nome, sizeof(Nome));
format(String, sizeof(String), "PM De %s: %s",Nome, Texto);
SendClientMessage(ID,0xFFFF00AA,String);
return 1;
}
dcmd_fakechat(playerid,params[]) { if(PlayerInfo[playerid][Level] >= 5) { new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index); if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "USAGE: /fakechat [playerid] [text]"); new player1 = strval(tmp); if(PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin"); if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) { CMDMessageToAdmins(playerid,"FAKECHAT"); SendPlayerMessageToAll(player1, params[strlen(tmp)+1]); return SendClientMessage(playerid,blue,"Fake message sent"); } else return SendClientMessage(playerid,red,"ERROR: Player is not connected"); } else return SendClientMessage(playerid,red,"Vocк nгo tem o Level suficiente para executar esse comando"); } |