SA-MP Forums Archive
[Ajuda] Chat - 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] Chat (/showthread.php?tid=339141)



[Ajuda] Chat - SynVengeance - 02.05.2012



queria fazer um sistema de chat igaul esse ae
[ID] [VIP] [Nick]
Ex. [1] [VIP] Everton : ..
quando player for normal [ID] [Nick]
Mais nгo sei fazer ..

Код HTML:
if (strcmp(cmd, "/setarvip", true) == 0)
{
	if (!IsPlayerAdmin(playerid)) return 0;
	new tmp[128];
	new plid;
	tmp = strtok(cmdtext, idx);
	if (!strlen(tmp))
	{
		SendClientMessage(playerid, 0x008040AA, "(ERRO) Use: /setarvip [id].");
		return 1;
	}
	plid = strval(tmp);
	if (IsPlayerConnected(plid))
	{
		new pname[MAX_PLAYER_NAME];
		GetPlayerName(plid, pname, MAX_PLAYER_NAME);
		format(file2, sizeof(file2), PASTA_CONTAS, pname);
		dini_IntSet(file2, "VIP", 1);
		SpawnPlayer(playerid);
		SendClientMessage(playerid, 0x00FF00AA, "(INFO) VIP Setado com sucesso");
		SendClientMessage(plid, 0x00FF00AA, "(INFO) Um admin setou VIP para vocк aproveite ;D");
		return 1;
	}
	else
	{
		SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido");
		return 1;
	}
}



Re: [Ajuda] Chat - Edu33 - 02.05.2012

Quote:
Originally Posted by SynVengeance
Посмотреть сообщение
galera queria qui o id do player qui falar no chat fose igaul a este e quando o player for vip aparecer asim tbm alguem mi ajuda ?
Que?



Re : [Ajuda] Chat - 3V3RTON - 02.05.2012

Acho qe entendi ele qe que quando o player VIP fala aparecer
[ID] [VIP] [Nick]
Ex. [1] [VIP] Everton : ..
Mais nгo sei fazer ..


Re: [Ajuda] Chat - steki. - 02.05.2012

strins


Re: [Ajuda] Chat - Djair_Black - 02.05.2012

Cara, vou tentar ver se consigo quando chegar em casa xD. Tou nт celular na hora da aula de portuguкs. Entгo flw veih!


Re: [Ajuda] Chat - SPOT_M16 - 02.05.2012

toma ai meu minino

Код:
public OnPlayerText(playerid, text[])
{
format(string, sizeof(string), "%s.ini",pname);
if(dini_Int(string,"VIP") ==  1)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(stringv, sizeof(stringv), "  [ID:%d][VIP]: %s",playerid,text);
SendPlayerMessageToAll(playerid,stringv);
return 0;
}
}



Re: [Ajuda] Chat - Trigo - 02.05.2012

sу completando..
pawn Код:
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(string, sizeof(string), "%s.ini",pname);
if(dini_Int(string,"VIP") ==  1)
{
format(stringv, sizeof(stringv), "  [ID:%d][VIP]: %s",playerid,text);
SendPlayerMessageToAll(playerid,stringv);
}else {
format(stringv, sizeof(stringv), "  [ID:%d]: %s",playerid,text);
SendPlayerMessageToAll(playerid,stringv);
}
return 0;
}
c der erro avisa *--*