SA-MP Forums Archive
[AJUDA]bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA]bug (/showthread.php?tid=351380)



[AJUDA]bug - billy the kid - 16.06.2012

new times


Re: [AJUDA]bug - .FuneraL. - 16.06.2012

pawn Код:
GameTextForPlayer(id,"~n~~n~~n~~n~~n~~n~~w~M ENSAGEM PRIVADA RECEBIDA",3000,3);
Coloque isto no lugar de seu segundo GameTextForPlayer.


Re: [AJUDA]bug - Don_Speed - 16.06.2012

Nao e Bug!
pawn Код:
#include <a_samp>
#include <gl_common>
#define COLOR_PURPLE 0x9900FFAA
#define COLOR_VIOLET 0x9955DEEE
#define COLOR_GREEN 0x33AA33AA
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
   return true;
}
public OnFilterScriptExit()
{
return true;
}

public OnPlayerCommandText(playerid, cmdtext[])
{

new cmd[256];
new tmp[256];
new Message[256];
new gMessage[256];
new pName[MAX_PLAYER_NAME+1];
new iName[MAX_PLAYER_NAME+1];
new idx;

cmd = strtok(cmdtext, idx);


if(strcmp("/pm", cmd, true) == 0)
{
tmp = strtok(cmdtext,idx);

if(!strlen(tmp) || strlen(tmp) > 5) {
SendClientMessage(playerid,COLOR_PURPLE,"Utilize : /pm [id] (menssagem)");
return true;
}

new id = strval(tmp);
gMessage = strrest(cmdtext,idx);

if(!strlen(gMessage)) {
SendClientMessage(playerid,COLOR_GREEN,"Utilize: /pm [id] (menssagem)");
return true;
}

if(!IsPlayerConnected(id)) {
SendClientMessage(playerid,COLOR_GREEN,"O Jogador nгo Conectado");
return true;
}

if(playerid != id) {
GetPlayerName(id,iName,sizeof(iName));
GetPlayerName(playerid,pName,sizeof(pName));
format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~w~M ENSAGEM PRIVADA ENVIADA",3000,3);
format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
SendClientMessage(id,COLOR_VIOLET,Message);
GameTextForPlayer(id,"~n~~n~~n~~n~~n~~n~~w~M ENSAGEM PRIVADA RECEBIDA",3000,3);
PlayerPlaySound(id,1085,0.0,0.0,0.0);

printf("PM: %s",Message);

}
else {
GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~w~E STE ID E SEU!!",3000,3);
}
return true;
}
return false;
}