[PEDIDO] Anuncio
#3

pawn Код:
if(strcmp(cmd,"/anuncio",true)==0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new tmp[256];
strmid(tmp,cmdtext,2,strlen(cmdtext));
if(!strlen(tmp)) {
SendClientMessage(playerid,Vermelho, "Digite: /anuncio [texto]");
return 1;
} else {
format(string, sizeof(string), "[Admin] %s diz: %s ", aname, tmp);
SendClientMessageToAll(0xAA3333AA,string);
return 1;
}
}else{
SendClientMessage(playerid,Vermelho,"[x] Vocк nгo tem acesso a esse comando!");
return 1;
}
}
Ou entao ↑
:/
Aproveita q hj eu to bonzin '-'

pawn Код:
if(strcmp("/pm", cmd, true) == 0)
{
new tmp[256];
if(!strlen(tmp) || strlen(tmp) > 5) {
SendClientMessage(playerid,0xFFFF22AA,"Use: /pm [id] [messagen]");
return 1;
}
new id = strval(tmp);
if(!strlen(gMessage)) {
SendClientMessage(playerid,0xFFFF22AA,"Use: /pm [id] [messagen]");
return 1;
}
if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,0xFFFF22AA,"- Id Invalido -");
return 1;
}
if(playerid != id) {
GetPlayerName(id,iName,sizeof(iName));
GetPlayerName(playerid,pName,sizeof(pName));
format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
SendClientMessage(playerid,0xFFCC2299,Message);
format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(id,0xFFFF22AA,Message);
PlayerPlaySound(id,1085,0.0,0.0,0.0);
printf("PM: %s",Message);
}
else {
SendClientMessage(playerid,0xFF444499,"Vocк nгo pode mandar pm para vocк mesmo.");
}
return 1;
}
Para o /pm funcionar add isso no OnPlayerCommandText:

pawn Код:
new Message[256];
new gMessage[256];
new pName[MAX_PLAYER_NAME+1];
new iName[MAX_PLAYER_NAME+1];
Reply


Messages In This Thread
[PEDIDO] Anuncio - by Hashtag - 17.11.2011, 20:46
Re: [PEDIDO] Anuncio - by [KoS]Izaac - 17.11.2011, 20:48
Re: [PEDIDO] Anuncio - by dPlaYer_ - 17.11.2011, 20:52
Re: [PEDIDO] Anuncio - by Hashtag - 17.11.2011, 20:57
Re: [PEDIDO] Anuncio - by Hashtag - 17.11.2011, 21:15
Re: [PEDIDO] Anuncio - by [KoS]Izaac - 17.11.2011, 22:09
Re: [PEDIDO] Anuncio - by Hashtag - 17.11.2011, 22:20
Re: [PEDIDO] Anuncio - by [KoS]Izaac - 17.11.2011, 22:32
Re: [PEDIDO] Anuncio - by Hashtag - 17.11.2011, 22:36
Re: [PEDIDO] Anuncio - by [KoS]Izaac - 17.11.2011, 22:45

Forum Jump:


Users browsing this thread: 1 Guest(s)