[AJUDA]Problemas no OnPlayerKeyStateChange
#1

Bom, tenho um sistema de casas e hoje pela manhг terminei meu sistema de empresas.
tava tudo ok, atй eu fazer a parada de entrar/sair na empresa

Quando eu tiro o da empresa, funciona normalmente o entrar/sair das casas
agora quando eu coloco o da empresa, o da empresa funciona normalmente
e o da casa, me teleporta pra uma posiзгo nada haver..

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
        for(new i = 0; i <= TotalEmpresas; ++i)
        {
            if(IsPlayerInRangeOfPoint(playerid, 3, BusinessInfo[i][SaidaX], BusinessInfo[i][SaidaY], BusinessInfo[i][SaidaZ]))
            if(BusinessInfo[i][Interior] == 0) return SendClientMessage(playerid, -1, "Empresa desativada temporбriamente.");
            {
                if(BusinessInfo[i][Chave] == 0)
                {
                    SetPlayerInterior(playerid, BusinessInfo[i][Interior]);
                    SetPlayerVirtualWorld(playerid, BusinessInfo[i][VirtualWorld]);
                    SetPlayerPos(playerid, BusinessInfo[i][EntradaX], BusinessInfo[i][EntradaY], BusinessInfo[i][EntradaZ]);
                }
                else { GameTextForPlayer(playerid, "EMPRESA FECHADA", 3000, 1); }
            }
            if(IsPlayerInRangeOfPoint(playerid, 3, BusinessInfo[i][EntradaX], BusinessInfo[i][EntradaY], BusinessInfo[i][EntradaZ]))
            {
                if(GetPlayerVirtualWorld(playerid) == BusinessInfo[i][VirtualWorld])
                {
                    SetPlayerInterior(playerid, 0);
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerPos(playerid, BusinessInfo[i][SaidaX], BusinessInfo[i][SaidaY], BusinessInfo[i][SaidaZ]);
                }
            }
        }
        for(new i = 0; i <= TotalCasas; ++i)
        {
            if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[i][SaidaX], HouseInfo[i][SaidaY], HouseInfo[i][SaidaZ]))
            {
                if(HouseInfo[i][Chave] == 0)
                {
                    SetPlayerInterior(playerid, HouseInfo[i][Interior]);
                    SetPlayerVirtualWorld(playerid, HouseInfo[i][VirtualWorld]);
                    SetPlayerPos(playerid, HouseInfo[i][EntradaX], HouseInfo[i][EntradaY], HouseInfo[i][EntradaZ]);
                }
                else { GameTextForPlayer(playerid, "CASA FECHADA", 3000, 1); }
            }
            if(IsPlayerInRangeOfPoint(playerid, 3, HouseInfo[i][EntradaX], HouseInfo[i][EntradaY], HouseInfo[i][EntradaZ]))
            {
                if(GetPlayerVirtualWorld(playerid) == HouseInfo[i][VirtualWorld])
                {
                    SetPlayerInterior(playerid, 0);
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerPos(playerid, HouseInfo[i][SaidaX], HouseInfo[i][SaidaY], HouseInfo[i][SaidaZ]);
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
[AJUDA]Problemas no OnPlayerKeyStateChange - by [Y]ellow - 14.02.2012, 11:13
Re: [AJUDA]Problemas no OnPlayerKeyStateChange - by paulor - 14.02.2012, 14:26
Re: [AJUDA]Problemas no OnPlayerKeyStateChange - by [Y]ellow - 14.02.2012, 14:37
Re: [AJUDA]Problemas no OnPlayerKeyStateChange - by paulor - 14.02.2012, 15:04

Forum Jump:


Users browsing this thread: 2 Guest(s)