SA-MP Forums Archive
[Pedido] Tutorial Virtual World - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Tutorial Virtual World (/showthread.php?tid=561778)



Tutorial Virtual World - JoshNudock - 05.02.2015

Como o tituto jб diz tudo, eu queria um bom tutorial rapido para eu desbugar o interior aqui..

pawn Код:
else if (PlayerToPoint(1.5,playerid,1481.0386,-1772.3120,18.7958)) //Prefeitura LS
            {
                SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                SetPlayerVirtualWorld(playerid, 0);
                PlayerInfo[playerid][pInt] = 3;
                if(PlayerInfo[playerid][pEmprego] == 0 && PlayerInfo[playerid][pConnectTime] < 5)
                {
                    TutorialPrefeitura(playerid);
                }
            }
            else if (PlayerToPoint(1.5,playerid,2375.5764,2306.3108,8.1406)) //Prefeitura LV
            {
                SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                SetPlayerVirtualWorld(playerid, 1);
                PlayerInfo[playerid][pInt] = 3;
                if(PlayerInfo[playerid][pEmprego] == 0 && PlayerInfo[playerid][pConnectTime] < 5)
                {
                    TutorialPrefeitura(playerid);
                }
            }
pawn Код:
else if (PlayerToPoint(1.5, playerid, 390.7482, 173.8620, 1008.3828)) //Prefeitura LS
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, 1481.0386, -1772.3120, 18.7958);
                SetPlayerVirtualWorld(playerid, 0);
                PlayerInfo[playerid][pInt] = 0;
            }
            else if (PlayerToPoint(1.5, playerid, 390.7482, 173.8620, 1008.3828)) //Prefeitura LV
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, 2376.0698, 2309.6929, 8.1406);
                SetPlayerVirtualWorld(playerid, 0);
                PlayerInfo[playerid][pInt] = 0;
            }
nesse ae os dois interiores se encontram(eu acho) e um entra em um lugar sai em outro(entra na prefeitura de SF e sai em LS)..


Re: Tutorial Virtual World - Dolby - 05.02.2015

Maldita mania de querer tutorial pra tudo, tsc, tsc...

Jб que estгo invertidos, usando um pouco o raciocino, dб pra pensar em inverter as coordenadas?


Re: Tutorial Virtual World - JoshNudock - 05.02.2015

Como assim? inverter coordenadas caraw? eu nгo nasci sabendo e estou com problema com o mesmo e nгo consigo consertar pois sempre dб erros e bugs, e vocк sу pq tem uma Reputaзгo boa aquiw no fуrum SA-MP acha que pode falar ou atй julgar alguйm? eu nem vou falar ... "Ajuda se quiser" ou "Se nгo quiser ajudar nгo ajuda", vou ser logo sincero smd, esse caraw nunca posta um cуdigo se quer para ajudar alguйm e sу manda links que podem ser encontrados em na net ou atй no "Deixe eu usar o ****** para vocк".. tenta usar sua reputaзгo com humildade.. й isso й [PEDIDO] "Tutorial", ou seja, quero aprender pq nгo consigo nunca, mais nunca, consertar isso porraw! ..


Re: Tutorial Virtual World - RafaelOsio - 05.02.2015

Deixa eu ver se entendi: Vocк tem duas prefeituras de mesmo interior, e quando o player entra em uma ele sai na entrada da outra, certo ?
Bom, se for isso, crie uma variavel e atribua um valor para quando o player entrar na pprefeitura A, e outro valor quando o player entrar na prefeitura B. Depois disso, quando o player querer sair da prefeitura, faзa um teste com essa variбvel, ou seja, se variavel igual 1, seta ele na frente da prefeitura A, se nгo, sete ele na frente da prefeitura B. Sei pouco de pawn, mas ja tive esse problema e me ajudaram dessa maneira.. Sobre tutoriais, SA-MP Wiki estб ai vйi..


Re: Tutorial Virtual World - RafaelOsio - 05.02.2015

Sei pouco de pawn. Com isso, a medida que vou avanзando no meu GM, vou anotando o que eu vou precisar: Bom preciso enviar uka mensagem ao player e outra a todosos players. Depois disso, vou no ****** e pesquiso a funзгo. Depois disso, vou no SAMP Wiki e coloco a funзгo para ver os parвmetros, como a funзгo funciona, e assim eu vou criando meu GM...


Re: Tutorial Virtual World - MultiKill - 05.02.2015

Use PVars:

SetPVarInt
GetPVarInt
DeletePVar


Re: Tutorial Virtual World - GabrielDias_Invision - 05.02.2015

Seta virtual world quando entrar.

pawn Код:
else if (PlayerToPoint(1.5,playerid,1481.0386,-1772.3120,18.7958)) //Prefeitura LS
            {
                SetPlayerInterior(playerid,3);
                SetPlayerVirtualWorld(playerid, 30);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                SetPlayerVirtualWorld(playerid, 0);
                PlayerInfo[playerid][pInt] = 3;
                if(PlayerInfo[playerid][pEmprego] == 0 && PlayerInfo[playerid][pConnectTime] < 5)
                {
                    TutorialPrefeitura(playerid);
                }
            }
            else if (PlayerToPoint(1.5,playerid,2375.5764,2306.3108,8.1406)) //Prefeitura LV
            {
                SetPlayerInterior(playerid,3);
                SetPlayerVirtualWorld(playerid, 31);
                SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
                SetPlayerVirtualWorld(playerid, 1);
                PlayerInfo[playerid][pInt] = 3;
                if(PlayerInfo[playerid][pEmprego] == 0 && PlayerInfo[playerid][pConnectTime] < 5)
                {
                    TutorialPrefeitura(playerid);
                }
            }
Geta qdo sair
pawn Код:
else if (PlayerToPoint(1.5, playerid, 390.7482, 173.8620, 1008.3828) && GetPlayerVirtualWorld(playerid) == 30) //Prefeitura LS
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid, 1481.0386, -1772.3120, 18.7958);
                SetPlayerVirtualWorld(playerid, 0);
                PlayerInfo[playerid][pInt] = 0;
            }
            else if (PlayerToPoint(1.5, playerid, 390.7482, 173.8620, 1008.3828) && GetPlayerVirtualWorld(playerid) == 31) //Prefeitura LV
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid, 2376.0698, 2309.6929, 8.1406);
                SetPlayerVirtualWorld(playerid, 0);
                PlayerInfo[playerid][pInt] = 0;
            }
Setando virtual world eles entram no mesmo lugar porйm nгo se enxergam.

Eu usei 30 pra LS e 31 pra LV mas vc pode trocar.


Re: Tutorial Virtual World - ZeZin - 05.02.2015

Pelo menos posta os tutoriais no lugar correto.