Jump to content
  • 0

ShowPlayerDialog


only4fun

Question

12 answers to this question

Recommended Posts

stuntman[]!" post="90197" timestamp="1314132391"]

new string[ 128 ];

format( string, 128, "Ai %d$", GetPlayerMoney( playerid ) );
ShowPlayerDialog( playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Titlu", string, "Select", "Cancel");

sau ce ?

nu stiu sigur, de ex sa te intrebe:-?...cati ani ai? si daca pui 16 sa iti afiseze numarul

Link to comment
Share on other sites

pei da ma

faci

un dialog_style_input acolo sc o intrebare "cati ani ai ?" dupa el va trebui sa scrie in spatiul acela varsta .. dupa sa apara un Sendclientmessage "ai setat varsta cu succes!"

Din cate stiu astea se folosesc la RP RPG GF etc etc;))

Am vazut ca tu foloseai "DIALOGID+1" nu mai folosi asa ceva o sa strice tot GM. Foloseste asta DIALOGID1 (FARA +) .

Ce poate strica "+" ?

Pei depinde poate sa strice toate dialogurile !

Adica sa strice toate dialogurie ?

Asa bine cand o sa apara orice dialog sv o sa se stinga

NU MAI FOLOSITI DIALOGID plus inca ceva nu e bine !

EDIT: Pei la SendClientMessage faceai ca sa citeasca ce a sc ala in casuta %s (varsta setata):)

468833_437698_362328_hiphop.jpg
Link to comment
Share on other sites

pei da ma

faci

un dialog_style_input acolo sc o intrebare "cati ani ai ?" dupa el va trebui sa scrie in spatiul acela varsta .. dupa sa apara un Sendclientmessage "ai setat varsta cu succes!"

Din cate stiu astea se folosesc la RP RPG GF etc etc;))

Am vazut ca tu foloseai "DIALOGID+1" nu mai folosi asa ceva o sa strice tot GM. Foloseste asta DIALOGID1 (FARA +) .

Ce poate strica "+" ?

Pei depinde poate sa strice toate dialogurile !

Adica sa strice toate dialogurie ?

Asa bine cand o sa apara orice dialog sv o sa se stinga

NU MAI FOLOSITI DIALOGID plus inca ceva nu e bine !

da, dar nu vreau sa scrie "ai setat varsta cu succes", vreau " ai setat varsta 16"

acum am o problema, dupa tutorial apare prima aia de completat cu feminin sau masculin...apoi tre sa scriu ceva, apare si cealalta..apoi tre sa scriu iar ceva, se intampla pentru ca este in public OnPlayerText(playerid, text[])

unde tre sa  il pun?

Link to comment
Share on other sites

Uite aici man:

ShowPlayerDialog( playerid, Varsta, DIALOG_STYLE_UNPUT, "Varsta:", "Te tugam sa ne spui ce varsta ai\nScrieo in satiul de mai jos:", "Button1", "Button2" );
OnDialogResponse:
if ( dialogid == Varsta )
{
    if ( !response ) return 1;//Asta ii de accea asa ca, cand apasa pe al doilea button sa nu ii faca nici o actiune!
    
    new str[ 128 ];
    format( str, sizeof( str ), "Ai setat varsta %d cu succes", inputtext );
    SendClientMessage( playerid, CULOAREAAAA, str );
    //si celalate functii pe care vrei sa le pui
    return 1;
}

cam atat asta ii asa ca un fel de model ft simplu...sper sa iti dai seama dupa el...

Fara reclama in semnatura!

Link to comment
Share on other sites

Uite aici man:

ShowPlayerDialog( playerid, Varsta, DIALOG_STYLE_UNPUT, "Varsta:", "Te tugam sa ne spui ce varsta ai\nScrieo in satiul de mai jos:", "Button1", "Button2" );
OnDialogResponse:
if ( dialogid == Varsta )
{
    if ( !response ) return 1;//Asta ii de accea asa ca, cand apasa pe al doilea button sa nu ii faca nici o actiune!
    
    new str[ 128 ];
    format( str, sizeof( str ), "Ai setat varsta %d cu succes", inputtext );
    SendClientMessage( playerid, CULOAREAAAA, str );
    //si celalate functii pe care vrei sa le pui
    return 1;
}
cam atat asta ii asa ca un fel de model ft simplu...sper sa iti dai seama dupa el...
da man, asa am si eu dar problema e urmatoarea
public OnPlayerText(playerid, text[])
{
if(RegistrationStep[playerid] > 0)
	{
        if(RegistrationStep[playerid] == 1)
	    {
  			ShowPlayerDialog(playerid, 75, DIALOG_STYLE_LIST, "1.Selecteaza sexul:", "Masculin\nFeminin", "Select", "Cancel");
			return 0;
		}
	    if(RegistrationStep[playerid] == 2)
	    {
			ShowPlayerDialog(playerid,76,DIALOG_STYLE_INPUT,"2.Setati varsta:","Scrieti varta in casuta urmatoare:","Login","Cancel");
			return 0;
	    }

iar daca il mut da erori la compilare, unde tre mai exact sa il pun?

EDIT: AM REZOLVAT!

Acum cum trebuie sa fac, ca atunci cand raspunsul nu este in numere sa afiseze "Raspunsul tau trebuie sa fie in cifre" iar PlayerInfo[playerid]


= sa ia acea valoare.

Link to comment
Share on other sites

ce e gresit in asta? nu stiu..

     

  if(dialogid == 76)
		{
  			if(response)
          	{
        		new message[128];
        		format(message, sizeof(message), "Ti-ai setat varsta la %s ani",PlayerInfo[playerid][pAge]);
        		SendClientMessage(playerid, 0xFFFFFFFF, message);
        		RegistrationStep[playerid] = 3;
			 }
			 else if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "Trebuia sa iti setezi varsta. Te rog reconecteaza-te");
     	}

Link to comment
Share on other sites

ce e gresit in asta? nu stiu..

     

  if(dialogid == 76)
		{
  			if(response)
          	{
        		new message[128];
        		format(message, sizeof(message), "Ti-ai setat varsta la %s ani",PlayerInfo[playerid][pAge]);
        		SendClientMessage(playerid, 0xFFFFFFFF, message);
        		RegistrationStep[playerid] = 3;
			 }
			 else if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "Trebuia sa iti setezi varsta. Te rog reconecteaza-te");
     	}
1.Ai grija la dublu post!! 2.Fa asa:
if ( dialogid == 76 )
{
    if ( response )
    {
         new str[ 128 ];
         format( str, sizeof( str ), "Ti-ai setat varsta la %d ani", inputtext );
         SendClientMessage(playerid, 0xFFFFFFFF, str );
         RegistrationStep[ playerid ] = 3;
    }
	 else if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "Trebuia sa iti setezi varsta. Te rog reconecteaza-te");
}

Fara reclama in semnatura!

Link to comment
Share on other sites

1.Ai grija la dublu post!! 2.Fa asa:
if ( dialogid == 76 )
{
    if ( response )
    {
         new str[ 128 ];
         format( str, sizeof( str ), "Ti-ai setat varsta la %d ani", inputtext );
         SendClientMessage(playerid, 0xFFFFFFFF, str );
         RegistrationStep[ playerid ] = 3;
    }
	 else if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "Trebuia sa iti setezi varsta. Te rog reconecteaza-te");
}

scz scz...mereu apas gresit,

dar nu trebuia sa folosesc undeva PlayerInfo[playerid]


, ca varsta sa ia valoarea scrisa?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.