Interiores -
Azah - 21.02.2017
Nгo sei muito bem se й uma ajuda mais sim uma duvida.
O GM na qual estou programando estб com 20% pronto para prosseguir eu preciso criar interiores.
Como vou ativar San Andreas "sim ela toda", eu vou repetir alguns interiores no caso.
Entгo, eu teria q definir cada cidade p/ sair nela ?
Ex:
Код:
new EntrouLS;
new EntrouSF; // Nгo irб usar por enquanto й sу pra mostrar que terб +1 entrada
new EntrouLV; // Nгo irб usar por enquanto й sу pra mostrar que terб +1 entrada
if(strcmp(cmd, "/entrar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(2, playerid,1480.9403,-1770.8481,18.7958))
{
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
EntrouLS = 1;
}
else if (PlayerToPoint(1, playerid,306.3995,-159.1051,999.5938))
{
if (EntrouLS == 1)
{
SetPlayerPos(playerid,305.05056762695,-159.16743469238,999.59375);
SetPlayerInterior(playerid,6);
EntrouLS = 0;
}
}
}
No caso seria +- assim ?
OBS: Esse nгo й meu cуdigo certo, montei isso rapidinho sу perguntar se й mais ou menos isso. Meu codigo estб muito mais bem identado, mais й sу para eu poder entender a base que usei esse ai.
Re: Interiores -
johntrybescripter - 21.02.2017
Mano, se for o que eu entendi eu fiz de uma forma que eu acho atй mais fбcil... exemplo:
ao entrar no interior em LS vc seta virtualworld 1 em SF 2 em LV 3,
se for o mesmo interior o que vc pode fazer й getar o mundo virtual, se for 1 ele retorna ao local em ls, se for 2 sf e se for 3 em lv..
Exemplo:
Entrando:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, -1751.1934,964.0541,24.8906))
{
SetPlayerPos(playerid, 388.7208,173.4743,1008.3828);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerInterior(playerid, 3);
}
Saindo:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 388.7208,173.4743,1008.3828))
{
new mundo = GetPlayerVirtualWorld(playerid);
if(mundo == 2)
{
SetPlayerPos(playerid, -1751.1934,964.0541,24.8906);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
}
Re: Interiores -
Azah - 22.02.2017
й +- isso, um amigo meu me deu uma ideia aqui para criar mais facil se funfar eu volto e digo!
Re: Interiores -
johntrybescripter - 22.02.2017
da forma que vocк fez da certo tb mas acho que й bom usar [MAX_PLAYERS]