27.01.2012, 09:40
Usa assim:
Ah, e poe no GM (se nгo tiver) isso em qualquer lugar do GM:
E isso no topo:
Pode ser usado em vбrios comandos de Admin, pra mandar mensagens, e tals.
pawn Код:
if(strcmp(cmd, "/pularadmin", true) == 0)
{
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid,-1,"Vocк nгo й admin!");
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "Use: /pularadmin [ID do Player]");
if(PlayerPaintballing[playerid] != 0) return SendClientMessage(playerid,COLOR_GREY," Vocк nгo pode Usar Este Comando no evento!");
if(PlayerInfo[playerid][pJailed] != 0) return SendClientMessage(playerid,COLOR_GREY," Vocк nгo pode Usar Este Comando Preso!");
new playa;
new Float:slx, Float:sly, Float:slz;
playa = ReturnUser(tmp);
if(!IsPlayerConnected(playa)) return SendClientMessage(playerid, -1, "Player nгo conectado");
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(playa, slx, sly, slz);
SetPlayerPos(playa, slx, sly, slz+10);
PlayerPlaySound(playa, 1130, slx, sly, slz+5);
printf("[Aviso]: %s levou um tapa de %s",giveplayer,sendername);
format(string, sizeof(string), "[Aviso]: %s levou um tapa de %s",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
return 1;
}
pawn Код:
public ABroadCast(color,const string[],level)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (PlayerInfo[i][pAdmin] >= 1)
{
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
}
return 1;
}
pawn Код:
forward ABroadCast(color,const string[],level);