17.12.2013, 22:42
Hi I've been developping my gamemode for over 2 years now and when I started I was using proxdetector. I can see chat from players in another virtual world in a shop for example using the same interior. Here's a little example of my code of some one talking. This is an RP server.
I was thinking of doing a check for all players to see if they were in the same world or something along the lines of that.
Maybe something like..
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)
{
blah blah
Would this work alright?
pawn Код:
if(PLogged[playerid] == 1)
{
if(WearingMask[playerid] == 0)
{
if(AccentOn[playerid] == 1)
{
format(string, sizeof(string), "%s says (%s accent): %s", GetPlayerNameEx(playerid), Accent[playerid],text);
ProxDetector(20.0, playerid, string, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
}
else
{
format(string, sizeof(string), "%s says: %s", GetPlayerNameEx(playerid),text);
ProxDetector(20.0, playerid, string, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
}
}
else
{
if(AccentOn[playerid] == 1)
{
format(string, sizeof(string), "Masked person says (%s accent): %s", Accent[playerid], text);
ProxDetector(20.0, playerid, string, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
}
else
{
format(string, sizeof(string), "Masked person says: %s", text);
ProxDetector(20.0, playerid, string, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
}
}
}
return 0;
}
Maybe something like..
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)
{
blah blah
Would this work alright?