[DUV] Virtual World e Interiores(BurguerShot),(Pizza) e (Banco)
#1

Ae, Estou tentando Criar um Virtual World para uma Burguer Shot em SF, Pois em LS jб tem uma Burguer Shot e com o mesmo interior por isso preciso usar o virtual world pra nao dar conflito entre as 2, E estou usando o mesmo conceito para fazer outras coisas como pizza, loja de arma e banco, Mais nao estou conseguindo utilizar o virtual world, peзo que me ajudem e olhem se estoou fazendo corretamente...

A Duvida й se eu estou fazendo certo:

ENTRADA E SAIDA DA BURGUER SHOT:

else if (PlayerToPointStripped(2.0, playerid,-2355.8181,1008.1110,50.8984, cx,cy,cz))
{
//ENTRADA
SetPlayerPos(playerid, 363.3360,-74.5500,1001.5078 );
GameTextForPlayer(playerid, "~p~Bem vindo a ~r~Burguer Shot",5000,3);
SetPlayerInterior(playerid,16);
PlayerInfo[playerid][pInt] = 16;
}
else if (PlayerToPointStripped(2.0, playerid,363.3360,-74.5500,1001.5078, cx,cy,cz))
{
//SAIDA
if(GetPlayerVirtualWorld(playerid) == 0)
{
SetPlayerPos(playerid, -2355.8181,1008.1110,50.8984);
GameTextForPlayer(playerid, "~r~San Fierro",5000,3);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}

Deis de jб, Agradeзo
Reply
#2

tenta assim...
Nao testei!

pawn Код:
//No topo do seu GM/FS

#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

//No public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

//========================ENTRADA DA BURGUER SHOT DE SF=========================
if (PRESSED( KEY_SECONDARY_ATTACK ))//Tecla F
 {
    if (PlayerToPointStripped(2.0, playerid,-2355.8181,1008.1110,50.8984, cx,cy,cz))//Entrada
    {
    SetPlayerPos(playerid, 363.3360,-74.5500,1001.5078 );//Seta o player dentro da burguer shot de SF
    SetPlayerInterior(playerid,16);
    SetPlayerVirtualWorld(playerid,1);
    return 1;
    }
 }
//========================ENTRADA DA BURGUER SHOT DE LS=========================
if (PRESSED( KEY_SECONDARY_ATTACK ))//Tecla F
 {
    if (PlayerToPointStripped(2.0, playerid,X,Y,Z, cx,cy,cz))//Entrada de LS coloque as coords!
    {
    SetPlayerPos(playerid,X,Y,Z );//Seta o player dentro da burguer shot de LS
    SetPlayerInterior(playerid,16);
    SetPlayerVirtualWorld(playerid,0);
    return 1;
    }
 }
if (PRESSED( KEY_SECONDARY_ATTACK ))//Tecla F
 {
new vid[MAX_PLAYERS] = GetPlayerVirtualWorld(playerid);
    if (PlayerToPointStripped(2.0, playerid,363.3360,-74.5500,1001.5078, cx,cy,cz))
    {
    if (vid[playerid] == 1)//Se ele entro em SF vai sair em SF
    {
    SetPlayerPos(playerid, -2355.8181,1008.1110,50.8984);
    GameTextForPlayer(playerid, "~r~San Fierro",5000,3);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerVirtualWorld(playerid,0);
    return 1;
    }
    else if(vid[playerid] == 0)//Se ele entro em LS vai sair em LS
    {
    SetPlayerPos(playerid, x,y,z);//Coloque as coords de los santos.
    GameTextForPlayer(playerid, "~r~Los Santos",5000,3);
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    }
    }

 }
Reply
#3

pawn Код:
else if (PlayerToPointStripped(2.0, playerid,-2355.8181,1008.1110,50.8984, cx,cy,cz))
{
//ENTRADA  
SetPlayerPos(playerid, 363.3360,-74.5500,1001.5078 );
GameTextForPlayer(playerid, "~p~Bem vindo a ~r~Burguer Shot",5000,3);
SetPlayerVirtualWorld(playerid, 1);
SetPlayerInterior(playerid,16);
PlayerInfo[playerid][pInt] = 16;
}
else if (PlayerToPointStripped(2.0, playerid,363.3360,-74.5500,1001.5078, cx,cy,cz))
{
//SAIDA
if(GetPlayerVirtualWorld(playerid) == 1)
{
SetPlayerPos(playerid, -2355.8181,1008.1110,50.8984);
GameTextForPlayer(playerid, "~r~San Fierro",5000,3);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)