if(strcmp(cmdtext, "/enter", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
{
if PlayerToPoint(5,playerid,-2447.0032,523.1661,30.3037)
*then
{
SetPlayerPos(playerid,1494.325195,1304.942871,1093.289062);
SetPlayerInterior(playerid,3);
SetPlayerVirtualWorld(playerid, 77);
SendClientMessage(playerid,COLOR_1GREEN,"*** Welcome to School Instructors HQ !");
return 1;
}
}
}
if(strcmp(cmdtext, "/enter", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
{
if PlayerToPoint(5,playerid,-1969.5778,92.0575,27.6875)
*then
{
SetPlayerPos(playerid,1494.325195,1304.942871,1093.289062);
SetPlayerInterior(playerid,3);
SetPlayerVirtualWorld(playerid, 79);
SendClientMessage(playerid,COLOR_1GREEN,"*** Welcome to Taxi Company HQ !");
return 1;
}
}
}
|
In the radius chat, add virtual world checks (make sure they're in the same)
|
if(IsPlayerInRangeOfPoint(playerid,x,y,z))SendClientMessage(...);
if(GetPlayerVirtualWorld(playerid)==GetPlayerVirtualWorld(i))
if(IsPlayerInRangeOfPoint(playerid,x,y,z))SendClientMessage(...);
if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/say", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/l)ocal [local chat]");
return 1;
}
if(FindIP(result)) /// Anti-Reclama
{
SendClientMessage(playerid, COLOR_RED, "You have kicked for Guardian , because you write an IP Adrees.");
new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "Server Guardian: {FFFF00}%s was kicked with reason: Write an IP Adreess (Reclama)",advertiser);
SendClientMessageToAll(COLOR_RED,string);
KickLog(string);
Kick(playerid);
return 1;
}
if(anty(result) && PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0)
{
new advertiser[MAX_PLAYER_NAME];
GetPlayerName(playerid, advertiser, sizeof(advertiser));
format(string, sizeof(string), "Server Guardian: {FFFF00}%s was kicked with reason: Reclama pe /l",advertiser);
SendClientMessageToAll(COLOR_RED,string);
Kick(playerid);
return 0;
}
if(PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0)
{
for(new i=0; i<MAX_ENTRY; i++)
{
if(!Swear[i][0]) continue;
Cenzura(result,Swear[i]);
}
}
format(string, sizeof(string), "%s Says: %s", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
if (PlayerInfo[playerid][pAdmin] >= 1339)
{
format(string, sizeof(string), "%s Says: %s", sendername, result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
}
return 1;
}