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



Dialogs aleatorios - iTouchS - 26.01.2016

Eu queria fazer um sistema que tem dialogs aleatorios, exemplo, se o jogador estiver em um radio de 10 metros da Coordenada: X, Y, Z aparece o dialog, se ele estiver em um raio de 10 metros de outro lugar do mapa ( X, Y, Z) aparece outro, e depois de 15 minutos esses dialogs mudam.


Re: Dialogs aleatorios - Ever_SH - 26.01.2016

Explique melhor como deve funcionar? mudar como? Para que seria esse sistema?


Re: Dialogs aleatorios - Delete_ - 26.01.2016

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wiki/SetTimer


Re: Dialogs aleatorios - iTouchS - 26.01.2016

Quote:
Originally Posted by Ever_SH
Посмотреть сообщение
Explique melhor como deve funcionar? mudar como? Para que seria esse sistema?
Vou explicar:

quando o jogador chegar na grove e digitar /dialog aparece o dialog 1
quando o jogador chegar no park gleen e digitar /dialog aparece o dialog 2
quando o jogador chegar na favela e digitar /dialog aparece o dialog 3
quando o jogador chegar no aero de ls e digitar /dialog aparece o dialog 4

Depois de 15 minutos isso e invertido aleatoriamente,

quando o jogador chegar na grove e digitar /dialog aparece o dialog 4
quando o jogador chegar no park gleen e digitar /dialog aparece o dialog 3
quando o jogador chegar na favela e digitar /dialog aparece o dialog 1
quando o jogador chegar no aero de ls e digitar /dialog aparece o dialog 2

Depois de 15 minutos isso e invertido aleatoriamente,

quando o jogador chegar na grove e digitar /dialog aparece o dialog 3
quando o jogador chegar no park gleen e digitar /dialog aparece o dialog 3
quando o jogador chegar na favela e digitar /dialog aparece o dialog 2
quando o jogador chegar no aero de ls e digitar /dialog aparece o dialog 1


Re: Dialogs aleatorios - capron - 26.01.2016

Crie um comando:

Use:

Quote:

if(IsPlayerInRangeOfPoint(playerid, 2.0, CorX, CorY, CorZ)

Quote:

TextDrawShowForPlayer(playerid, Nome_Text_Draw);




Re: Dialogs aleatorios - iTouchS - 26.01.2016

Quote:
Originally Posted by capron
Посмотреть сообщение
Crie um comando:

Use:
Isso eu sei obrigado, mais como eu poderia fazer para que fosse aleatуrio ?


Re: Dialogs aleatorios - LockedLucas - 26.01.2016

Para ser aleatуrio use random

https://sampwiki.blast.hk/wiki/Random


Re: Dialogs aleatorios - iTouchS - 26.01.2016

Quote:
Originally Posted by LockedLucas
Посмотреть сообщение
Para ser aleatуrio use random

https://sampwiki.blast.hk/wiki/Random
Pode me dar um exemplo de como colocar um timer nisso ?


Re: Dialogs aleatorios - LockedLucas - 26.01.2016

PHP код:
new Float:Random[][1] =
{
    
    {-
2796.98541224.818020.5429192.0335}
};
SetTimerEx("Random"5000false"i"playerid);
forward Random(playerid);
public 
Random(playerid)
{
   new 
rand random(sizeof(Random));
   return 
1;

E + - assim que se usa SetTimer + Random


Re: Dialogs aleatorios - iTouchS - 26.01.2016

Quote:
Originally Posted by LockedLucas
Посмотреть сообщение
PHP код:
new Float:Random[][1] =
{
    
    {-
2796.98541224.818020.5429192.0335}
};
SetTimerEx("Random"5000false"i"playerid);
forward Random(playerid);
public 
Random(playerid)
{
   new 
rand random(sizeof(Random));
   return 
1;

E + - assim que se usa SetTimer + Random
No caso aonde iria o dialog ?

@edit
PHP код:
new rand random(sizeof(Random)); 
eu nгo intendi essa parte