[FilterScript] PizzaPuntjes Website Displayer v1
#4

Looks good. A little tip straight from the SA-MP wiki: You're better off using an enum for dialogs. You will no longer have to assign an ID to them, thus avoiding dialog ID collisions. However, enums use memory to store the defines, whereas defines are processed in the 'pre-processor' (compiling) stage.

PHP код:
enum
{
    
DIALOG_SHOW_OPTIONS,
    
DIALOG_CHANGE_WEBSITE
}; 
EDIT:
I prefer the use of a switch statement to look up dialogid's under OnDialogResponse instead of all the if statements. It is more organized and easier to manage.
Reply


Messages In This Thread
PizzaPuntjes Website Displayer v1 - by PizzaPuntjes - 10.06.2015, 12:20
Re: PizzaPuntjes Website Displayer v1 - by Alex Magaсa - 10.06.2015, 12:31
Re: PizzaPuntjes Website Displayer v1 - by PizzaPuntjes - 10.06.2015, 12:35
Re: PizzaPuntjes Website Displayer v1 - by AndySedeyn - 10.06.2015, 13:04
Re: PizzaPuntjes Website Displayer v1 - by PizzaPuntjes - 10.06.2015, 13:40
Re: PizzaPuntjes Website Displayer v1 - by FplayerGR - 10.06.2015, 15:01
Re: PizzaPuntjes Website Displayer v1 - by Konverse - 10.06.2015, 15:06
Re: PizzaPuntjes Website Displayer v1 - by Pottus - 10.06.2015, 17:56
Re: PizzaPuntjes Website Displayer v1 - by SNAKE12 - 10.06.2015, 17:59
Re: PizzaPuntjes Website Displayer v1 - by PizzaPuntjes - 11.06.2015, 14:32

Forum Jump:


Users browsing this thread: 1 Guest(s)