[Ajuda] Interiores
#1

Ola galera estou com outra duvida seguinte to fazendo um sv rpg dai criei 2 cidades sf e ls estou com problema na prefeitura, eu fiz a prefeitura de ls e ficou beleza mais a prefeitura de sf quando a pessoa entra ela sai na prefeitura de ls ou seja ele entra em sf mais sai na de ls, alguem me ajuda usei esses codigos:

/entrar
PHP код:
            if (PlayerToPoint(2.0playerid,-2765.4399,382.2945,6.3281))
            {
                
SetPlayerInterior(playerid,4);
                
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                
GameTextForPlayer(playerid"~g~Bem vindo a Prefeitura !"50001);
                
PlayerInfo[playerid][pInt] = 3;
                
PlayerInfo[playerid][pLocal] = 241;
            }
            if (
PlayerToPoint(2.0playerid,1480.9403,-1770.8481,18.7958))
            {
                
SetPlayerInterior(playerid,3);
                
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                
GameTextForPlayer(playerid"~g~Bem vindo a Prefeitura !"50001);
                
PlayerInfo[playerid][pInt] = 3;
                
PlayerInfo[playerid][pLocal] = 241;
            } 
/sair
PHP код:
            else if (PlayerToPoint(2.0playerid,387.7978,173.8582,1008.3828))
            {
                
SetPlayerInterior(playerid,0);
                
SetPlayerPos(playerid,1481.2550,-1765.8638,18.7958);
                
PlayerInfo[playerid][pInt] = 0;
                
PlayerInfo[playerid][pLocal] = 255;
            }
            else if (
PlayerToPoint(2.0playerid,387.7978,173.8582,1008.3828))
            {
                
SetPlayerInterior(playerid,0);
                
SetPlayerPos(playerid,-2765.4399,382.2945,6.3281);
                
PlayerInfo[playerid][pInt] = 0;
                
PlayerInfo[playerid][pLocal] = 255;
            } 
Reply
#2

Especifique as duas Prefeituras.
Reply
#3

SetPlayerVirtualWorld.
Faltou return no seu cуdigo.
Cria uma variбvel como MAX_PLAYERS pra identificar se a prefeitura que ele tб й em LS ou SF.
Reply
#4

Josma qual seu msn minha nega

Shick como assim especificar?
Reply
#5

Suporte_Josma@hotmail.com
Qualquer coisa to no TS.

O Shick pediu pra especificar por que nгo entendeu sua duvida, ele achou que o problema era no /entrar por que pensou que vocк criou dois interiores(mas ele jб entendeu)

OBS: Respondi por ele por que ele tб ausente.

pawn Код:
//**************** Inico do GM ************
new NaPref[MAX_PLAYERS] = 0;
//************* Comando /entrar ****************
            if (PlayerToPoint(2.0, playerid,-2765.4399,382.2945,6.3281))
            {
                SetPlayerInterior(playerid,4);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                GameTextForPlayer(playerid, "~g~Bem vindo a Prefeitura !", 5000, 1);
                PlayerInfo[playerid][pInt] = 3;
                PlayerInfo[playerid][pLocal] = 241;
                NaPref[playerid] = 1;
                return 1;
            }
            if (PlayerToPoint(2.0, playerid,1480.9403,-1770.8481,18.7958))
            {
                SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                GameTextForPlayer(playerid, "~g~Bem vindo a Prefeitura !", 5000, 1);
                PlayerInfo[playerid][pInt] = 3;
                PlayerInfo[playerid][pLocal] = 241;
                NaPref[playerid] = 2;
                return 1;
            }

//*********************** Comando /sair *****************
            else if (PlayerToPoint(2.0, playerid,387.7978,173.8582,1008.3828))
            {
                SetPlayerInterior(playerid,0);
                if(NaPref[playerid] == 1)
                {
                    SetPlayerPos(playerid,1481.2550,-1765.8638,18.7958);
                    NaPref[playerid] = 0;
                }
                else if(NaPref[playerid] == 2)
                {
                    SetPlayerPos(playerid,-2765.4399,382.2945,6.3281);
                    NaPref[playerid] = 0;
                }
                PlayerInfo[playerid][pInt] = 0;
                PlayerInfo[playerid][pLocal] = 255;
                return 1;
            }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)