[ Solved ] Define created
Hello, i've a little problem with my define wich i was created.
Code:
For doing this after in my code : Code:
But it do not work. Why ? Is it possible or not ? |
Re: [ Request ] Define created
PHP Code:
|
Re: [ Request ] Define created
Oh thanks. So it's impossible to do that with ... define ?
It's work fine :) |
Re: [ Request ] Define created
You can't do that are you want to do in a simple 'define'.
You should create a stock or something ( i think ). |
Re: [ Request ] Define created
You can use a macro, but it should more defined like that :
Code:
#define give_weapons(%1,%2,%3,%4) ( give_item( %1, %2 ), cs_set_user_bpammo( %1, %3, %4 ) ) |
Re: [ Request ] Define created
Okay Thanks Lucas and Arkshine.
So one more question before to close the thread. What is the best the define or the stock ? Edit: I do that : Code:
But it's too long. Is it possible to make a define on different line ? |
Re: [ Request ] Define created
Situational.
|
Re: [ Request ] Define created
You have to use '\' to put things on another line.
That's said, you don't have to define things for all. For a group of natives, more appropriate to use a function instead, because if such macro is used more than one time, it's going to be redundant and you will increase plugin size for nothing. Also, for readability/debug/practical reason, there is no point to use a macro here. |
Re: [ Request ] Define created
Ok thanks a lot.
Solved |
Re: [ Solved ] Define created
Just to say it do not work when i do with '\'. It's work only if i compil in local. Impossible to compile on-line.
|
| All times are GMT -4. The time now is 06:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.