[Help!] Long Dialog Box Rep++
#1

How to make long Dialog box?
example text:
Код:
1. Attacked the security guard >> Jail for 15 months and fines for $ 15,000
2. Attacking security officers wearing firearms >> Jail for 15 months and fines for $ 25,000
3. Avoid a security officer with a vehicle >> Jail for 12 months, for $ 10,000 fines, driver's license for 7 days detention.
4. Dodged security guards >> Jail for 10 months, fines for $ 5,000.
5. Illegal activities >> Jailtime dependent activities, fines for $ 20,000 <Transaksi Narkoba, senjata, party in a public place without permission (15 months)>
6. Rob in public places >> Jailtime dependent place, $ 10,000 fines for 15 months, <Dekat Government building except that 10 months>
7. Deadly assault >> Jail for 12 months, $ 10,000 fines for Hand <Dengan kosong>
8. Assault with a deadly weapon >> Jail for 17 months, $ 20,000 fines for <Pistol, Shotgun>
9. Deadly assault with a deadly weapon >> Jail for 20 months, $ 30,000 fines for <Spas/CombatShotgun, AK47, M4a1, bazooka, sniper, dll>
10. Planning >> Jail for murder of 15 months, fines for $ 20,000
11. Manslaughter >> Jail for 15 months, fines for $ 10,000
12. The murder trial >> Jail for 12 months, fines for $ 5,000
13. Punishment of Terrorism Events >> jailtime for life <30 days> $ 250,000 fines for
Reply
#2

Use strcat
Example.
pawn Код:
new mydialog[256];
strcat(mydialog,"1. Attacked the security guard >> Jail for 15 months and fines for $ 15,000 \n");
strcat(mydialog,"2. Attacking security officers wearing firearms >> Jail for 15 months and fines for $ 25,000 \n");
//and the rest of it....
..................
.....................
ShowPlayerDialog(playerid,your dialog id,DIALOG_STYLE_MSGBOX, "your dialog caption", mydialog,"first button","second button");
Reply
#3

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Use strcat
Example.
pawn Код:
new mydialog[256];
strcat(mydialog,"1. Attacked the security guard >> Jail for 15 months and fines for $ 15,000 \n");
strcat(mydialog,"2. Attacking security officers wearing firearms >> Jail for 15 months and fines for $ 25,000 \n");
//and the rest of it....
..................
.....................
ShowPlayerDialog(playerid,your dialog id,DIALOG_STYLE_MSGBOX, "your dialog caption", mydialog,"first button","second button");
thanks bro.. this not give me error to compile
Reply
#4

Have to mention, each of your lines contains an average of 120 chars and if you leave it 256 then only two of them would be displayed.
pawn Код:
new mydialog[1612];
// Continue with strcat.

or

new mydialogstext[13][] = {
"1. Attacked the security guard >> Jail for 15 months and fines for $ 15,000",
"2. Attacking security officers wearing firearms >> Jail for 15 months and fines for $ 25,000",
"3. Avoid a security officer with a vehicle >> Jail for 12 months, for $ 10,000 fines, driver's license for 7 days detention.",
"4. Dodged security guards >> Jail for 10 months, fines for $ 5,000.",
"5. Illegal activities >> Jailtime dependent activities, fines for $ 20,000 <Transaksi Narkoba, senjata, party in a public place without permission (15 months)>",
"6. Rob in public places >> Jailtime dependent place, $ 10,000 fines for 15 months, <Dekat Government building "except that 10 months>",
"
7. Deadly assault >> Jail for 12 months, $ 10,000 fines for Hand <Dengan kosong>",
"
8. Assault with a deadly weapon >> Jail for 17 months, $ 20,000 fines for <Pistol, Shotgun>",
"
9. Deadly assault with a deadly weapon >> Jail for 20 months, $ 30,000 fines for <Spas/CombatShotgun, AK47, M4a1, bazooka, sniper, dll>",
"
10. Planning >> Jail for murder of 15 months, fines for $ 20,000",
"
11. Manslaughter >> Jail for 15 months, fines for $ 10,000",
"
12. The murder trial >> Jail for 12 months, fines for $ 5,000",
"
13. Punishment of Terrorism Events >> jailtime for life <30 days> $ 250,000 fines for"
};
//continue with strcat...
Reply
#5

pawn Код:
new longdialog[13][] = {
"1. Attacked the security guard >> Jail for 15 months and fines for $ 15,000",
"2. Attacking security officers wearing firearms >> Jail for 15 months and fines for $ 25,000",
"3. Avoid a security officer with a vehicle >> Jail for 12 months, for $ 10,000 fines, driver's license for 7 days detention.",
"4. Dodged security guards >> Jail for 10 months, fines for $ 5,000.",
"5. Illegal activities >> Jailtime dependent activities, fines for $ 20,000 <Transaksi Narkoba, senjata, party in a public place without permission (15 months)>",
"6. Rob in public places >> Jailtime dependent place, $ 10,000 fines for 15 months, <Dekat Government building except that 10 months>",
"7. Deadly assault >> Jail for 12 months, $ 10,000 fines for Hand <Dengan kosong>",
"8. Assault with a deadly weapon >> Jail for 17 months, $ 20,000 fines for <Pistol, Shotgun>",
"9. Deadly assault with a deadly weapon >> Jail for 20 months, $ 30,000 fines for <Spas/CombatShotgun, AK47, M4a1, bazooka, sniper, dll>",
"10. Planning >> Jail for murder of 15 months, fines for $ 20,000",
"11. Manslaughter >> Jail for 15 months, fines for $ 10,000",
"12. The murder trial >> Jail for 12 months, fines for $ 5,000",
"13. Punishment of Terrorism Events >> jailtime for life <30 days> $ 250,000 fines for"
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)