14.09.2014, 12:07
Quote:
|
Yes, y_master will solve that problem, by using "SERVER" and "CLIENT" scripts.
|
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>
Or do we have to include it?
PHP код:
gamemode.pwn
pawn Code:
#define YSI_IS_CLIENT
#include <fs_streamer>
#include <fs_users>
main()
{
}
PHP код:
gamemode.pwn
pawn Code:
#define YSI_IS_CLIENT
#include <funcs_streamer>
#include <funcs_users>
main()
{
}
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(model, Float:x, Float:y, Float:z);
global AddObject(model, Float:x, Float:y, Float:z)
{
new
objectid = /* something */;
return objectid;
}
main()
{
}
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?


