Jump to content

[0.3c RC4->] Dialog cu un buton.


Guest PlayON

Recommended Posts

Dialog cu un buton

Atentie

Aveti nevoie de versiunea 0.3c RC 4 sau mai mare!

http://www.sa-mp.ro/forum/index.php/topic,7536.0.html

Informatii

Este chiar foarte usor de facut, este vorba de a pune la al 2-lea buton lenul la strng de 0! Pe babeste adica inloc de "Exit" ca al 2-lea buton, pui "" fara spatiu fara nimic! AAla este considerat string de 0!

Preview - Click pentru a mari..

35hlcut.png

Codul

Acesta este codul folosit de catre mine in imaginea de deasupra, sper ca intelegeti!

ShowPlayerDialog( playerid, 1000,DIALOG_STYLE_MSGBOX, "Just a lol", "testing oan button!", "LOLZ","" );

Vedeti la sfarsit? Am pus "" ca ultim buton, si asta, mai nou, pawn il considera de 0 LEN. ( LEN = Marime String )

De acuma in colo stiti cum se pune un buton, Din pacate nu se pot pune 3 .. inca :)

Link to comment
Share on other sites

  • 4 weeks later...
Guest PlayON

nu cred ca era nevoie de un tutorial, ca era logic, daca vrei 1 buton il stergi pe celalalt :-s

sterge tu ultimu-l string "" si vedem daca iti merge..

Trebe neaparat sa ai ""  ca astfel nu mere

Dar Arguments nush ce.(eroare)

Si multi nu stiu despre asta.

Link to comment
Share on other sites

  • 3 months later...
Guest PlayON

La ce foloseste 1000?

ShowPlayerDialog( playerid, 1000,DIALOG_STYLE_MSGBOX, "Just a lol", "testing oan button!", "LOLZ","" );

ID cu care vei lucra.

exemplu sub OnDialogResponse

if ( dialogid == 1000 )

{

      if ( response )

          SetPlayerHealth( playerid, 100.0 );

      else

          SetPlayerHealth( playerid, 0.0 );

}

Daca apasa Buton1 v-a primi viata, daca apasa Buton2 v-a fi omorat.

Link to comment
Share on other sites

Guest PlayON

E cool dar cum fac dialog cu comenzi de DCMD ca nu stiu la asta ca dak pun ala sub da eroare

ZCMD are:

CMD:comanda( playerid, params[ ] )

DCMD are:

dcmd_comanda( playerid, params[ ] )

Deci unpic de logica acuma te rog ?

Link to comment
Share on other sites

[pawn]

dcmd_credits( playerid, params[ ] )

if(strcmp(cmdtext, "/credits", true) == 0)

{

    ShowPlayerDialog( playerid, 1000,DIALOG_STYLE_MSGBOX,"[LS]Gang-War Credits"," Owner Server: Lucian \n \

  \n/Gamemode by: Lucian \n \

  \n/Anims by: Vyorel \n\ ","OK","Exit");

  }

return 1;

}

[/pawn]

eroare

D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1759) : error 017: undefined symbol "cmdtext"
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1763) : error 027: invalid character constant
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1763) : error 027: invalid character constant
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1757) : warning 203: symbol is never used: "params"
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1757 -- 1765) : error 010: invalid function or declaration
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1757 -- 1765) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

Link to comment
Share on other sites

[pawn]

dcmd_credits( playerid, params[ ] )

if(strcmp(cmdtext, "/credits", true) == 0)

{

    ShowPlayerDialog( playerid, 1000,DIALOG_STYLE_MSGBOX,"[LS]Gang-War Credits"," Owner Server: Lucian \n \

  \n/Gamemode by: Lucian \n \

  \n/Anims by: Vyorel \n\ ","OK","Exit");

  }

return 1;

}

[/pawn]

eroare

D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1759) : error 017: undefined symbol "cmdtext"
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1763) : error 027: invalid character constant
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1763) : error 027: invalid character constant
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1757) : warning 203: symbol is never used: "params"
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1757 -- 1765) : error 010: invalid function or declaration
D:\[email protected] (Lucianâ„¢)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1757 -- 1765) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

LOL

Asa e corect:

[pawn]

CMD:credits( playerid, params[ ] )

{

ShowPlayerDialog( playerid, 1000,DIALOG_STYLE_MSGBOX,"[LS]Gang-War Credits"," Owner Server: Lucian \n \

\n/Gamemode by: Lucian \n \

\n/Anims by: Vyorel \n\ ","OK","Exit");

return 1;

}

[/pawn]

Link to comment
Share on other sites

Ba Luaciane, habar nu ai scripting dar vad Credits: Lucian, ba tu vrei warn?

nu vreau nimic ca ca am rezolvat sigur multumita tutorialului tau dar fara dcmd_credits( playerid, params[ ] )

iar comanda e

dcmd_credits(playerid, cmdtext[]) {

if(strcmp(cmdtext, "/credits", true) == 0)

{

    ShowPlayerDialog( playerid, 1000,DIALOG_STYLE_MSGBOX,"[LS]Gang-War Credits"," Owner Server: Lucian \n \

  \n/Gamemode by: Lucian \n \

  \n/Anims by: Vyorel\n\

    ","OK");

  }

return 1;

}

si o mers

Pentru ce warn eu imi fac comenzile toate cu dialog si nu e FS e doar GM meu facut de mine lucrez la el de 4 luni si vreau sa fie foarte bazat e inceput de 0 facut dupa tutoriale nu dupa alte GM

Oricum asta nu te intereseaza dar sa nu imi dai warn aiurea eu fac ce vreau in GM meu

Link to comment
Share on other sites

Guest PlayON

nu vreau nimic ca ca am rezolvat sigur multumita tutorialului tau dar fara dcmd_credits( playerid, params[ ] )

iar comanda e

dcmd_credits(playerid, cmdtext[]) {

if(strcmp(cmdtext, "/credits", true) == 0)

{

    ShowPlayerDialog( playerid, 1000,DIALOG_STYLE_MSGBOX,"[LS]Gang-War Credits"," Owner Server: Lucian \n \

  \n/Gamemode by: Lucian \n \

  \n/Anims by: Vyorel\n\

    ","OK");

  }

return 1;

}

si o mers

Pentru ce warn eu imi fac comenzile toate cu dialog si nu e FS e doar GM meu facut de mine lucrez la el de 4 luni si vreau sa fie foarte bazat e inceput de 0 facut dupa tutoriale nu dupa alte GM

Oricum asta nu te intereseaza dar sa nu imi dai warn aiurea eu fac ce vreau in GM meu

Ti-as da warn pentru mesaju de pe mess, dar messu nu are de'aface cu forumu.

Sa te corectez, Nu ma intereseaza ce faci tu cu GM-ul altuia.

Nu incerca sa dovedesti adevarul!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.