07.11.2011, 21:05
Tirei do FS Base que vem no samp server jб, e dei uma editada, tб ae.
Й isso que vocк quer ?
pawn Код:
if(strcmp("/mp", cmd, true) == 0)
{
tmp = strtok(cmdtext,idx);
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -5, "Vocк nгo й Admin");
if(!strlen(tmp) || strlen(tmp) > 5) {
SendClientMessage(playerid,-3,"Use: /mp [ID] [Mensagem]");
return 1;
}
new id = strval(tmp);
gMessage = strrest(cmdtext,idx);
if(!strlen(gMessage)) {
SendClientMessage(playerid,-3,"Use /mp [ID] [Mensagem])");
return 1;
}
if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,-3,"Player nгo conectado!");
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,-7,Message);
format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(id,-7,Message);
PlayerPlaySound(id,1085,0.0,0.0,0.0);
printf("MP: %s",Message);
}
else {
SendClientMessage(playerid,-3,"Vocк nгo pode mandar mensagem pra vocк mesmo!");
}
return 1;
}