Quote:
Originally Posted by Kye
why not explain to us all how an enum is better than a preprocessor define?
|
The enum hold all dialogid that people use in their scripts, this way it's very easy to add a dialog id without searching for what id number to assign to it or incrementing another define, it just need to be named somewhere in the enum.
In a include file "enum_dialogid":
pawn Код:
enum
{
Admin_Panel_Example_Joe_Staff,
Simple_AdminScript_GhostTTT,
Click_Players_Name_Giacomand,
}
Then, for example Giacomand just replace his id in his script, by Click_Players_Name_Giacomand. He don't need to care about which id it will be assigned.
Someone may have to maintain this enum updated, and/or people who release scripts using dialogs, have to write in their topic what to add in the enum, for example Giacomand write: "add Click_Players_Name_Giacomand in the enum_dialogid.inc"...
And please Kye, make TogglePlayerMouse(playerid, bool:toggle), and GetPlayerMousePos(playerid, &x, &y), i remember i suggested these times ago..i really hoped to see them in 0.3, but no luck. They are useful, and i think, will be much more used by scripters than ShowPlayerDialog. It's basically what's missing to make amazing menus made of textdraws, as Seif suggested too.
I know, i'm not the one who have to script it, however i would like but i can't because sa-mp isn't open source.