29.04.2010, 05:34
Pra aquelas pessoas que gostam de ver oque os outros digitam
ANUNCIAR
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i)){
new stringcmd[256];
new playa[MAX_PLAYER_NAME];
GetPlayerName(playerid, playa,MAX_PLAYER_NAME);
format(stringcmd, 256, "O jogador %s Id:%d Digitou o Comando: %s", playa,playerid,cmdtext);
SendClientMessage(i,0xFFFFFFAA, stringcmd);
}
}
return 1;
}
return 0;
}
}
pawn Code:
if(strcmp(cmd,"/anunciar",true)==0){
if(IsPlayerAdmin(playerid)){//Somente para Admins s no /rcon
strmid(tmp,cmdtext,10,strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_RED,"/anunciar [texto]");
return 1;
} else {
GameTextForAll(tmp,3000,6);
return 1;
}
}else{
SendClientMessage(playerid,COLOR_RED,"Vocк nгo tem permissгo!");
return 1;
}
}