Y_Masters
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
Yes, y_master will solve that problem, by using "SERVER" and "CLIENT" scripts.
OK so my questions are:
https://sampforum.blast.hk/showthread.php?tid=296907
PHP код:
*fs_streamer.pwn
pawn Code
:
#define YSI_IS_SERVER
#include <funcs_streamer>
*fs_users.pwn
pawn Code
:
#define YSI_IS_SERVER
#include <funcs_users> 
You never included the .pwn files. Is this correct?
Or do we have to include it?
PHP код:
gamemode.pwn
pawn Code
:
#define YSI_IS_CLIENT
#include <fs_streamer>
#include <fs_users>
main()
{

Or was this correct (your code):
PHP код:
gamemode.pwn
pawn Code
:
#define YSI_IS_CLIENT
#include <funcs_streamer>
#include <funcs_users>
main()
{

Also a few lines after that,
Here you simply combine two files into one, but the define and the include separate the code am I correct.
This way you could just have one file instead of 8?
PHP код:
funcs_users.inc
This is using 
"MASTER" number 1.
pawn Code
:
#define YSI_IS_CLIENT
#define MASTER 1
#include <YSI\y_master>
static stock
    gsLoggedIn
[MAX_PLAYERS];
foreign bool:IsLoggedIn(playerid);
global 
bool:IsLoggedIn(playerid)
{
    return 
gsLoggedIn[playerid];
}
#define MASTER 2
#include <YSI\y_master>
foreign AddObject(modelFloat:xFloat:yFloat:z);
global 
AddObject(modelFloat:xFloat:yFloat:z)
{
    new
        
objectid /* something */;
    return 
objectid;
}
main()
{

My last question is every time I need to use a function like:
global AddObject()

If it is master number 2, I define the Master number"2"
And include y_master,

And then later on in my [gamemode.pwn] after using AddObject()

If I want to you something that was define as Master number "1"
I do the same thing.

My question here is would I have to define Master number 2 and include y_master again?
If I wish to use AddObject() again?
Reply


Messages In This Thread
Y_Masters - by Mariawantstowatchtv - 02.09.2014, 10:15
Re: Y_Masters - by Mariawantstowatchtv - 13.09.2014, 10:56
Re: Y_Masters - by paulommu - 13.09.2014, 13:49
Re: Y_Masters - by paulommu - 13.09.2014, 13:54
Re: Y_Masters - by Mariawantstowatchtv - 14.09.2014, 07:03
Re: Y_Masters - by Mariawantstowatchtv - 14.09.2014, 07:13
Re: Y_Masters - by Mariawantstowatchtv - 14.09.2014, 12:07
Re: Y_Masters - by Mariawantstowatchtv - 15.09.2014, 15:35
Re: Y_Masters - by Mariawantstowatchtv - 15.09.2014, 15:59
Re: Y_Masters - by Mariawantstowatchtv - 15.09.2014, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)