14.02.2011, 21:17
Arrumei pra vocк, basta colar tudo abaixo no seu Pawno e compilar
Espero ter ajudado
pawn Код:
#include <a_samp>
public OnFilterScriptInit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/pm", cmdtext, true, 3) == 0)
{
new ID[258], Mensagem[258];
ID = KcmD(1, cmdtext);
Mensagem = KcmD(2, cmdtext);
if(!strlen(ID))
{
SendClientMessage(playerid,0xFF6347AA,"Digite /pm [id] [texto].");
return 1;
}
if(!strlen(Mensagem))
{
SendClientMessage(playerid,0xFF6347AA,"Digite /pm [id] [texto].");
return 1;
}
new id = strval(ID);
if(!IsPlayerConnected(id))
{
SendClientMessage(playerid,0xFF6347AA,"Esse ID nгo existe!");
return 1;
}
if(playerid != id)
{
new iName[MAX_PLAYER_NAME], nName[MAX_PLAYER_NAME], Message[100];
GetPlayerName(id,iName,sizeof(iName));
GetPlayerName(playerid,nName,sizeof(nName));
format(Message,sizeof(Message),"• {FF0000}Mensagem Privada enviada para {FFFF00}%s(%d): %s",iName,id,Mensagem);
SendClientMessage(playerid,0xFFFF00AA,Message);
format(Message,sizeof(Message),"• {FF0000}Mensagem Privada de {FFFF00}%s(%d): %s",nName,playerid,Mensagem);
SendClientMessage(id,0xFFFF00AA,Message);
PlayerPlaySound(id,1085,0.0,0.0,0.0);
printf("PM: %s",Message);
return 1;
}
else
{
SendClientMessage(playerid,0xFF6347AA,"Vocк nгo pode mandar Mensagens Privadas para vocк mesmo!");
}
return 1;
}
return 0;
}
stock KcmD(param, cmdtext[])
{
new string[128], pos, var;
format(string, sizeof(string), "%s ", cmdtext);
while((pos = strfind(string, " ", true)) != -1)
{
if(var == param) return string;
var++;
strdel(string, 0, pos + 1);
if(strcmp(string, " ", true, pos) == 0) goto end;
}
end:
string[0] = '\0';
return string;
}
public OnFilterScriptExit()
{
return 1;
}
Espero ter ajudado