Virtual World
#1

How do you make it so that if a player is in a different virtual world you cant see any of there commands or messages?
Reply
#2

use getplayervirtualworld for both players and if its different add a return 1;
Reply
#3

pawn Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
{
    if(GetPlayerVirtualWorld(i) != GetPlayerVirtualWorld(i)) return 0;
}
Add this to OnPlayerText, not sure if it works: worth a try
Reply
#4

^ That makes no sense....

If the virtual world of a player doesnt equal the virtual world of the same player, return 0? WTF?

Time for you to go back to scripting basics

pawn Код:
public OnPlayerText(playerid, text[])
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
        {
            SendClientMessage(i, COLOR_WHITE, text);
        }
    }
    return 0;
}
Reply
#5

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
pawn Код:
for( new i = 0; i < MAX_PLAYERS; i++ )
{
    if(GetPlayerVirtualWorld(i) != GetPlayerVirtualWorld(i)) return 0;
}
Add this to OnPlayerText, not sure if it works: worth a try
isnt (i) standing for playerid, you still need to get the targetid :P
Reply
#6

Quote:
Originally Posted by Conroy
Посмотреть сообщение
^ That makes no sense....

If the virtual world of a player doesnt equal the virtual world of the same player, return 0? WTF?

Time for you to go back to scripting basics

pawn Код:
public OnPlayerText(playerid, text[])
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
        {
            SendClientMessage(i, COLOR_WHITE, text);
        }
    }
    return 0;
}
I just woke up, no need to rage immediately
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)