SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 29/05/2015, 05:49 AM   #61
Unrea1
Gangsta
 
Unrea1's Avatar
 
Join Date: Oct 2013
Location: Venezuela
Posts: 792
Reputation: 126
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Lines of problem in the include:

return Dialog_OnPlayerClickTextDraw(playerid, _:clickedid);

return Dialog_OnPlayerClickPlayerTD(playerid, _layertextid);
Unrea1 is offline   Reply With Quote
Old 29/05/2015, 06:10 AM   #62
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,766
Reputation: 840
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Quote:
Originally Posted by LatinZ View Post
Lines of problem in the include:

return Dialog_OnPlayerClickTextDraw(playerid, _:clickedid);

return Dialog_OnPlayerClickPlayerTD(playerid, _layertextid);
Sorry, those errors only occurred when you declared them in your mode. Because of the mismatch i made with _: instead i should have added Text:.

Fixed in R5 for both dialogs.inc and dialogs2.inc
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 29/05/2015, 06:24 AM   #63
Unrea1
Gangsta
 
Unrea1's Avatar
 
Join Date: Oct 2013
Location: Venezuela
Posts: 792
Reputation: 126
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Goob job.
Unrea1 is offline   Reply With Quote
Old 29/05/2015, 11:38 AM   #64
iWhite
Big Clucker
 
Join Date: May 2012
Posts: 176
Reputation: 18
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Quote:
TextDrawShowForPlayer(playerid, Spidometras[0]);
//TextDrawShowForPlayer(playerid, Spidometras[1]);
//TextDrawShowForPlayer(playerid, Spidometras[2]);
TextDrawSetPreviewRot(Spidometras[1], 0.000000, vehicleDB[vehicleid][Fuel]*3+10, 180.000000, 1.000000);
for(new lol=3; lol<16; lol++)
{
if(lol == 14)
{
continue;
}
if(lol == 5)
{
TextDrawShowForPlayer(playerid, Spidometras[1]);
}
if(lol == 12)
{
TextDrawShowForPlayer(playerid, Spidometras[14]);
}
TextDrawShowForPlayer(playerid, Spidometras[lol]);
}
PlayerTextDrawShow(playerid, Spidometras2[0][playerid]);
PlayerTextDrawShow(playerid, Spidometras2[1][playerid]);
When I delete this code, box isn't appearing when I enter vehicle(It's my speedometer textdraws).

And please, indent the code, because there are some warnings for loose indentation. I guess that's because this include was written with Notepad?

And shorten right side of the box to be exact as the left side, because there is unneeded gap between models and box(by shortening box textdraws by 10 points):



I'm doing all that by myself, but I have to do it again everytime new version comes out
iWhite is offline   Reply With Quote
Old 29/05/2015, 12:55 PM   #65
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,766
Reputation: 840
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Quote:
Originally Posted by iWhite View Post
When I delete this code, box isn't appearing when I enter vehicle(It's my speedometer textdraws).
Make sure to define FILTERSCRIPT if used in filterscript and maybe you are not reseting the value of those textdraws to INVALID_TEXT_DRAW when destroying and declaring the vars.

You can also have a look at this.

Or else i'll try my best to fix that when i am clear to the problem causing this.

Quote:
Originally Posted by iWhite View Post
And please, indent the code, because there are some warnings for loose indentation. I guess that's because this include was written with Notepad?
No it was written in PAWNO and the indentation don't appear to be right because of Pastebin. Maybe use RAW option and copy the code or i'll move to Github.

Quote:
Originally Posted by iWhite View Post
And shorten right side of the box to be exact as the left side, because there is unneeded gap between models and box(by shortening box textdraws by 10 points):



I'm doing all that by myself, but I have to do it again everytime new version comes out
I'll fix that in another update.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 29/05/2015, 01:49 PM   #66
iWhite
Big Clucker
 
Join Date: May 2012
Posts: 176
Reputation: 18
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Quote:
Originally Posted by Gammix View Post
Make sure to define FILTERSCRIPT if used in filterscript and maybe you are not reseting the value of those textdraws to INVALID_TEXT_DRAW when destroying and declaring the vars.

You can also have a look at this.

Or else i'll try my best to fix that when i am clear to the problem causing this.
I'm not using any filterscripts. When I don't show speedometer textdraws, the box isn't showing either, but when I show any half of speedometer textdraws, the box is showing... Like when I don't show Textdraw[0], Textdraw[1] and Textdraw[2], box isn't showing either, but if I show anyone of these textdraws, box appears... It's somekind of mystery...
iWhite is offline   Reply With Quote
Old 29/05/2015, 01:54 PM   #67
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,766
Reputation: 840
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Quote:
Originally Posted by iWhite View Post
I'm not using any filterscripts. When I don't show speedometer textdraws, the box isn't showing either, but when I show any half of speedometer textdraws, the box is showing... Like when I don't show Textdraw[0], Textdraw[1] and Textdraw[2], box isn't showing either, but if I show anyone of these textdraws, box appears... It's somekind of mystery...
The box isn't showing when you use ShowPlayerDialog or are you referring to your speedometer textdraws ?

Have you tried setting the textdraws to INVALID_TEXT_DRAW while destroying and setting the var value while declaring?

For example:
pawn Code:
new Text:textdraw = INVALID_TEXT_DRAW;
So in case your script trys to destroy the textdraw, it won't cause any trouble.

And do that when you destroy it once created.

And i rechecked the code, its working fine. I also performed a test with a gamemode and it worked, all fine.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 29/05/2015, 02:13 PM   #68
iWhite
Big Clucker
 
Join Date: May 2012
Posts: 176
Reputation: 18
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Quote:
Originally Posted by Gammix View Post
The box isn't showing when you use ShowPlayerDialog or are you referring to your speedometer textdraws ?

Have you tried setting the textdraws to INVALID_TEXT_DRAW while destroying and setting the var value while declaring?

For example:
pawn Code:
new Text:textdraw = INVALID_TEXT_DRAW;
So in case your script trys to destroy the textdraw, it won't cause any trouble.

And do that when you destroy it once created.

And i rechecked the code, its working fine. I also performed a test with a gamemode and it worked, all fine.

I'm so sorry, I found a bug in my code... I used number 3 in loop to show all textdraws, because I thought the loop will start from 4, but it started from number 3 and I don't have any textdraws with number 3, so gamemode showed Dialog box, because it's ID is 0...

I'm sorry, it's my mistake. I fixed it.

I've got an idea, how to optimize the script a little bit. You could put arrows < and > as one textdraw with spaces between them. Because I guess you're using button textures to get what textdraw player is pressing, so it would free one space for another textdraw
iWhite is offline   Reply With Quote
Old 29/05/2015, 02:16 PM   #69
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,766
Reputation: 840
Default Re: Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Quote:
Originally Posted by iWhite View Post
I'm so sorry, I found a bug in my code... I used number 3 in loop to show all textdraws, because I thought the loop will start from 4, but it started from number 3 and I don't have any textdraws with number 3, so gamemode showed Dialog box, because it's ID is 0...

I'm sorry, it's my mistake. I fixed it.

I've got an idea, how to optimize the script a little bit. You could put arrows < and > as one textdraw with spaces between them. Because I guess you're using button textures to get what textdraw player is pressing, so it would free one space for another textdraw
I'll think all about that in the next update.
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix is offline   Reply With Quote
Old 29/05/2015, 09:30 PM   #70
AlexBlack
Huge Clucker
 
Join Date: Oct 2013
Location: GetPlayerPos(playerid, x, y, z);
Posts: 308
Reputation: 84
Default Re : Dialogs Include (new dialog functions and DIALOG_STYLE_PREVMODEL)

Wow , this is realy awesome , i'am waiting something like that, thank you REP+
__________________
Unique DeathMatch Gamemode for sale, PM for more infos.
Game mode DM presque complet unique disponible a vendre MP.
AlexBlack is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Items spawner dialogs (zcmd & dialogs include) Q_Lite Filterscripts 17 16/10/2016 12:09 PM
[FilterScript] [FS]Fighting Styles,5 most usable styles Like in SP By Don_(GH) HAYTXA Filterscripts 10 28/03/2013 07:39 AM
Making an OnFilterScriptInit in an include without adding anything in the .pwn exepct the #include r3k1lLz_ Help Archive 6 06/01/2011 07:49 AM
[FilterScript] [FS]Trans World Airlines v0.2 [TWA] - Bug Fixed - Adding Dialogs Soon. Toni Filterscripts 16 13/06/2010 03:57 PM
[FilterScript] [FS] Fighting Styles (0.3a) - |Save styles in Dini| MoBiL[e] Filterscripts 23 24/04/2010 12:12 PM


All times are GMT. The time now is 08:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.