SA-MP Forums Archive
[Ajuda/Pedido]com um cmd - 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/Pedido]com um cmd (/showthread.php?tid=269753)



[Ajuda/Pedido]com um cmd - luiz_2010 - 17.07.2011

Sou novo no pawn mas tou comesando devagar fis um SV de drift depois de DM e agora um de RPG
Preciso de um comando tipo /forum e aparecesse em textdraw

eu tentei faser mas da erro no pawno
Код:
new Showing[MAX_PLAYERS];
Код:
new Text:Textdr0;
new Text:Textdr2;
new Text:Textdr3;
new Text:Textdr4;
new Text:Textdr5;
new Text:Textdr7;
new Text:Textdr8;
new Text:Textdr9;
new Text:Textdr10;
Код:
{
	TextDrawHideForAll(Textdr0);
	TextDrawDestroy(Textdr0);
	TextDrawHideForAll(Textdr2);
	TextDrawDestroy(Textdr2);
	TextDrawHideForAll(Textdr3);
	TextDrawDestroy(Textdr3);
	TextDrawHideForAll(Textdr4);
	TextDrawDestroy(Textdr4);
	TextDrawHideForAll(Textdr5);
	TextDrawDestroy(Textdr5);
	TextDrawHideForAll(Textdr7);
	TextDrawDestroy(Textdr7);
	TextDrawHideForAll(Textdr8);
	TextDrawDestroy(Textdr8);
	TextDrawHideForAll(Textdr9);
	TextDrawDestroy(Textdr9);
	TextDrawHideForAll(Textdr10);
	TextDrawDestroy(Textdr10);
	return 1;
}
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext, "/forum"))
	{
		if(Showing[playerid] == 1)
		{
			Showing[playerid] = 0;
			TextDrawHideForPlayer(playerid, Textdr0);
			TextDrawHideForPlayer(playerid, Textdr2);
			TextDrawHideForPlayer(playerid, Textdr3);
			TextDrawHideForPlayer(playerid, Textdr4);
			TextDrawHideForPlayer(playerid, Textdr5);
			TextDrawHideForPlayer(playerid, Textdr7);
			TextDrawHideForPlayer(playerid, Textdr8);
			TextDrawHideForPlayer(playerid, Textdr9);
			TextDrawHideForPlayer(playerid, Textdr10);
		}
		else
		{
			Showing[playerid] = 1;
			TextDrawShowForPlayer(playerid, Textdr0);
			TextDrawShowForPlayer(playerid, Textdr2);
			TextDrawShowForPlayer(playerid, Textdr3);
			TextDrawShowForPlayer(playerid, Textdr4);
			TextDrawShowForPlayer(playerid, Textdr5);
			TextDrawShowForPlayer(playerid, Textdr7);
			TextDrawShowForPlayer(playerid, Textdr8);
			TextDrawShowForPlayer(playerid, Textdr9);
			TextDrawShowForPlayer(playerid, Textdr10);
		}
	}
	return 1;
}



Re: [Ajuda/Pedido]com um cmd - RockFire - 17.07.2011

https://sampforum.blast.hk/showthread.php?tid=117851


Re: [Ajuda/Pedido]com um cmd - luiz_2010 - 17.07.2011

pois usei esse programa


Re: [Ajuda/Pedido]com um cmd - arakuta - 18.07.2011

Por que um /forum em TextDraw?

Por que nгo tenta com GameTextForPlayer?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true) == 0)
    {
        GameTextForPlayer(playerid,"SEUFORUM.FORUM.COM", 6000, 1)
        return 1;
    }
    return 0;
}
Aprenda mais sobre GameTextForPlayer


Re: [Ajuda/Pedido]com um cmd - Josma_cmd - 18.07.2011

Quote:
Originally Posted by arakuta
Посмотреть сообщение
Por que um /forum em TextDraw?

Por que nгo tenta com GameTextForPlayer?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true) == 0)
    {
        GameTextForPlayer(playerid,"SEUFORUM.FORUM.COM", 6000, 1)
        return 1;
    }
    return 0;
}
Aprenda mais sobre GameTextForPlayer
TextDraw's sгo mais bonitinhos kkkkkkkkkkkk.

OnTуpic
Quais sгo os erros? Quais as linhas dos erros?
Vocк criou os TextDraws? Exemplo:
pawn Код:
Textdr2 = TextDrawCreate(bla bla bla)?
Enfim, poste as linhas
Parabйns por comeзar do bбsico, nem todos tem o bom senso pra isso.