GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: N@rbirock - 2012. május 21. - 18:16:37

Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 21. - 18:16:37
Hogy lehet megcsinálni, hogy ha egy pontra érkezek bejön a dialóg? Próbáltam pickupal de úgy nem jó.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 21. - 18:20:18
így
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 21. - 18:25:43
De nekem nem parancsal kell.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 21. - 18:31:37
 if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))

 
ezen a soron van a hangsúly
 
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, ide milyen nagy legyen a hatótávolság, X,Y,Z))
ShowPlayerDialog(playerid.. többi része)
//és még ami kell bele
return 1;
}
Cím: Dialóg egy ponton
Írta: ProgressivE - 2012. május 21. - 18:33:00
Idézetet írta: N@rbirock date=1337616997\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic
Hogy lehet megcsinálni, hogy ha egy pontra érkezek bejön a dialóg? Próbáltam pickupal de úgy nem jó.
 


De nekem parancsal kell.
 
[/quote]
Ez bizony ellentmondás.. Amúgy megcsinálod a parancsot, hogy elõjöjjön a dialog, és beállítod, hogy csak az adott koordinátán lehessen használni.. Nézz utána, biztos rájössz hogyan kell..



Valahogy így van:
 
if(strcmp(cmd, \"/parancsod\", true) == 0
{
    if(IsPlayerInRangeOfPoint(playerid,koordináta);
aztán a dialog, meg stb

 
de nemértek hozzá különösebben..
Cím: Dialóg egy ponton
Írta: Gabor.. - 2012. május 21. - 19:37:46

public OnPlayerUpdate( playerid )
{
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 2695.6880, -1704.6300, 11.8438 ) ) // Cseréld le neked tetszõen
    {
        ShowPlayerDialog( playerid, 1000, DIALOG_STYLE_MSGBOX, \"Asd\", \"Aasd\", \"Ok\", \"\" );
    }
    return 1;
}
Cím: Dialóg egy ponton
Írta: ProgressivE - 2012. május 22. - 13:08:56
Azt mondja, hogy paranccsal kell neki.. ( Gondolom csak azon a bizonyos koordinátán lehessen használni )
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 22. - 13:20:41
Idézetet írta: ProgressivE date=1337684936\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic
Azt mondja, hogy paranccsal kell neki.. ( Gondolom csak azon a bizonyos koordinátán lehessen használni )
 
Nem mondtam olyant.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 22. - 13:20:58
Pont, hogy nem paranccsal kell neki. És egyébként már megírtam pár hozzászólással ezelõtt.....
Cím: Dialóg egy ponton
Írta: ProgressivE - 2012. május 22. - 13:24:45
Idézetet írta: N@rbirock date=1337685641\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic


Azt mondja, hogy paranccsal kell neki.. ( Gondolom csak azon a bizonyos koordinátán lehessen használni )
 
Nem mondtam olyant.
 
[/quote]
Akkor miért nem volt jó, amit már leírtak legalább 2x? :)
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 22. - 13:38:44
Ugyan az a baja mind a pickupnál egymásután jön be a dialóg és nem lehet megállítani.
Cím: Dialóg egy ponton
Írta: Gabor.. - 2012. május 22. - 13:47:51
public OnPlayerUpdate( playerid )
{
  if( GetPVarInt( playerid, \"InPoint\" ) == 0 )
  {
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 2695.6880, -1704.6300, 11.8438 ) ) // Cseréld le neked tetszõen
    {
        ShowPlayerDialog( playerid, 1000, DIALOG_STYLE_MSGBOX, \"Asd\", \"Aasd\", \"Ok\", \"\" );
        SetPVarInt( playerid, \"InPoint\", 1 );
    }
  }
  return 1;
}

 Így próbáld meg.
E.: És például hozz létre egy timert, ami ha letelik, újra 0 értéket adsz a playernek.
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 22. - 14:22:35
Így jó csak utána nem tok kimenni mivel egy másikra is alkalmaztam ami kiteleportál az interiorból.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 22. - 19:21:20
Idézetet írta: quer date=1337702310\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic

                        if (PlayerToPoint(1.0, i,kordináta))
   {
   ShowPlayerDialog(i,00090,DIALOG_STYLE_LIST,\"Dialog név\",\"1es opció\\n2es opció\\n3mas opció\",\"Kiválaszt\",\"Mégse\");
   SetPlayerPos(i, kordináta);
   }

 

Ehez kell egy for ciklus is szóval ez így nem jó magában...
Cím: Dialóg egy ponton
Írta: Cappsy - 2012. május 25. - 16:58:02
HOGYÉRTED???  hogy csak ott használhassa vagy ha odaáll elõjön? :angel: ^-^
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 25. - 16:58:31
Idézetet írta: cappsy date=1337957882\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic
HOGYÉRTED???  hogy csak ott használhassa vagy ha odaáll elõjön? :angel: ^-^
 
Ezen már túl vagyunk
Cím: Dialóg egy ponton
Írta: Cappsy - 2012. május 25. - 17:21:34
bocs... :tantrum: :tantrum: :tantrum: :tantrum: :tantrum: :tantrum: :tantrum: :tantrum:
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 25. - 18:31:38
Semmi gond. N@rbirock nem lehet, hogy keverednek a dialog ID-k?
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 25. - 18:39:17
Az nem lehet mert csak 3 dialog van és nincs olyan script se amibe van dialog.

Dupla hozzászólás automatikusan összefûzve. ( 2012. május 25. - 19:40:42 )

Mindegy megcsinálom hogy megnyomja az altot és akkor jön be de az ALT-nak mi a neve a játékba?
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 21. - 18:16:37
Hogy lehet megcsinálni, hogy ha egy pontra érkezek bejön a dialóg? Próbáltam pickupal de úgy nem jó.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 21. - 18:20:18
így
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 21. - 18:25:43
De nekem nem parancsal kell.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 21. - 18:31:37
 if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))

 
ezen a soron van a hangsúly
 
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, ide milyen nagy legyen a hatótávolság, X,Y,Z))
ShowPlayerDialog(playerid.. többi része)
//és még ami kell bele
return 1;
}
Cím: Dialóg egy ponton
Írta: ProgressivE - 2012. május 21. - 18:33:00
Idézetet írta: N@rbirock date=1337616997\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic
Hogy lehet megcsinálni, hogy ha egy pontra érkezek bejön a dialóg? Próbáltam pickupal de úgy nem jó.
 


De nekem parancsal kell.
 
[/quote]
Ez bizony ellentmondás.. Amúgy megcsinálod a parancsot, hogy elõjöjjön a dialog, és beállítod, hogy csak az adott koordinátán lehessen használni.. Nézz utána, biztos rájössz hogyan kell..



Valahogy így van:
 
if(strcmp(cmd, \"/parancsod\", true) == 0
{
    if(IsPlayerInRangeOfPoint(playerid,koordináta);
aztán a dialog, meg stb

 
de nemértek hozzá különösebben..
Cím: Dialóg egy ponton
Írta: Gabor.. - 2012. május 21. - 19:37:46

public OnPlayerUpdate( playerid )
{
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 2695.6880, -1704.6300, 11.8438 ) ) // Cseréld le neked tetszõen
    {
        ShowPlayerDialog( playerid, 1000, DIALOG_STYLE_MSGBOX, \"Asd\", \"Aasd\", \"Ok\", \"\" );
    }
    return 1;
}
Cím: Dialóg egy ponton
Írta: ProgressivE - 2012. május 22. - 13:08:56
Azt mondja, hogy paranccsal kell neki.. ( Gondolom csak azon a bizonyos koordinátán lehessen használni )
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 22. - 13:20:41
Idézetet írta: ProgressivE date=1337684936\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic
Azt mondja, hogy paranccsal kell neki.. ( Gondolom csak azon a bizonyos koordinátán lehessen használni )
 
Nem mondtam olyant.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 22. - 13:20:58
Pont, hogy nem paranccsal kell neki. És egyébként már megírtam pár hozzászólással ezelõtt.....
Cím: Dialóg egy ponton
Írta: ProgressivE - 2012. május 22. - 13:24:45
Idézetet írta: N@rbirock date=1337685641\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic


Azt mondja, hogy paranccsal kell neki.. ( Gondolom csak azon a bizonyos koordinátán lehessen használni )
 
Nem mondtam olyant.
 
[/quote]
Akkor miért nem volt jó, amit már leírtak legalább 2x? :)
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 22. - 13:38:44
Ugyan az a baja mind a pickupnál egymásután jön be a dialóg és nem lehet megállítani.
Cím: Dialóg egy ponton
Írta: Gabor.. - 2012. május 22. - 13:47:51
public OnPlayerUpdate( playerid )
{
  if( GetPVarInt( playerid, \"InPoint\" ) == 0 )
  {
    if( IsPlayerInRangeOfPoint( playerid, 7.0, 2695.6880, -1704.6300, 11.8438 ) ) // Cseréld le neked tetszõen
    {
        ShowPlayerDialog( playerid, 1000, DIALOG_STYLE_MSGBOX, \"Asd\", \"Aasd\", \"Ok\", \"\" );
        SetPVarInt( playerid, \"InPoint\", 1 );
    }
  }
  return 1;
}

 Így próbáld meg.
E.: És például hozz létre egy timert, ami ha letelik, újra 0 értéket adsz a playernek.
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 22. - 14:22:35
Így jó csak utána nem tok kimenni mivel egy másikra is alkalmaztam ami kiteleportál az interiorból.
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 22. - 19:21:20
Idézetet írta: quer date=1337702310\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic

                        if (PlayerToPoint(1.0, i,kordináta))
   {
   ShowPlayerDialog(i,00090,DIALOG_STYLE_LIST,\"Dialog név\",\"1es opció\\n2es opció\\n3mas opció\",\"Kiválaszt\",\"Mégse\");
   SetPlayerPos(i, kordináta);
   }

 

Ehez kell egy for ciklus is szóval ez így nem jó magában...
Cím: Dialóg egy ponton
Írta: Cappsy - 2012. május 25. - 16:58:02
HOGYÉRTED???  hogy csak ott használhassa vagy ha odaáll elõjön? :angel: ^-^
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 25. - 16:58:31
Idézetet írta: cappsy date=1337957882\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"21799\" data-ipsquote-contentclass=\"forums_Topic
HOGYÉRTED???  hogy csak ott használhassa vagy ha odaáll elõjön? :angel: ^-^
 
Ezen már túl vagyunk
Cím: Dialóg egy ponton
Írta: Cappsy - 2012. május 25. - 17:21:34
bocs... :tantrum: :tantrum: :tantrum: :tantrum: :tantrum: :tantrum: :tantrum: :tantrum:
Cím: Dialóg egy ponton
Írta: zeteni - 2012. május 25. - 18:31:38
Semmi gond. N@rbirock nem lehet, hogy keverednek a dialog ID-k?
Cím: Dialóg egy ponton
Írta: N@rbirock - 2012. május 25. - 18:39:17
Az nem lehet mert csak 3 dialog van és nincs olyan script se amibe van dialog.

Dupla hozzászólás automatikusan összefûzve. ( 2012. május 25. - 19:40:42 )

Mindegy megcsinálom hogy megnyomja az altot és akkor jön be de az ALT-nak mi a neve a játékba?