[CODE]Hide Dialog
#1

Код:
stock HidePlayerDialog(playerid)
{
	ShowPlayerDialog(playerid,-1,0,"","","","");
}
I Hope it will be useful and sorry bad english
Reply
#2

I think you meant to Usefull snippets?
Reply
#3

Код:
#define HidePlayerDialog(%1) ShowPlayerDialog(%1, -1, 0, " ", " ", " ", " ")
Will do the same thing.
Reply
#4

Quote:
Originally Posted by dre$tA
Код:
#define HidePlayerDialog(%1) ShowPlayerDialog(%1, -1, 0, " ", " ", " ", " ")
Will do the same thing.
I dont know the %1 what is it?
Reply
#5

If you still didn't understand it yet and the people didn't seem to make sense to you, here is a small explaination of how it works. It does not have to be accurate to the true explaination of how it works!

When using a constant/macro(define) you usually sometimes need special values like in functions e.g.

pawn Код:
stock Function(string[], arg)
{
  // do something here
}
As defines(macros) do not differ from value types, they have no different type. You probably know what a string, a integer, a float, a double etc means.
Defines do not care if its a string, a value or anything else.
So, when giving a define the possibility of holding values, you just count it down how many it are, e.g.

pawn Код:
#define Function(%1,%2) // Let it do something here with the values
All you have to do, when adding values to your function is counting up the numbers more likely. e.g. %1,%2,%3,%4 and so on.

I hope my personal explaination made you understand the sense behind all this. If you wish to know the exact explaination of how it works and the actually
more used words, such as macro, constant etc, you should read up the manuel.

Regards,
Extremo.
Reply
#6

Quote:
Originally Posted by Y_Leѕѕ
I really suggest you read pawn-lang.pdf, the explanation given by [NT]Extremo is insanely basic, there is a lot more they can do, but there are also a lot of limitations and problems.

Edit: Pages 93-96 contain the basics, but there is actually more, especially in SA:MP which uses a custom compiler to support stringize tokens (as in C - look them up from C documentation, but note that they're not implemented exactly the same).
How can I get it ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)