OnPlayerKeyStateChange
#6

Quote:
Originally Posted by Koala818
Посмотреть сообщение
I don't really see any other problem beside the coordinates. I tried to go to the coordinates: 1590.9293,1762.1729,12.5320 and it is inside a hospital in las venturas. And by inside i mean that you fall down.

Try replacing them with 1582.5271,1761.8899,10.8203 wich are the coordinates of the entrance in the hospital.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
        for(new i = 0; i <= MAX_BUSINESSES; i++) // now here's a loop through all businesses
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, vInfo[i][exterior][0],vInfo[i][exterior][1],vInfo[i][exterior][2])) // and if player is in range of business entrance
            {
                if(vInfo[i][bought] == 0) SPMB(playerid, "Noredami pirkti versla rasykite~n~/pirktiversla [ID]");
                SetPlayerPos(playerid, vInfo[i][interior][0],vInfo[i][interior][1],vInfo[i][interior][2]);
                SetPlayerInterior(playerid, vInfo[i][inter]);
                TogglePlayerControllable(playerid, false);
                SetTimerEx("FreezeTimer", 2000, false, "i", playerid);
                SetPlayerVirtualWorld(playerid, vInfo[i][ID]);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 2.0, vInfo[i][interior][0],vInfo[i][interior][1],vInfo[i][interior][2])) // else if players is range of business exit
            {
                SetPlayerPos(playerid, vInfo[i][exterior][0],vInfo[i][exterior][1],vInfo[i][exterior][2]);
                SetPlayerInterior(playerid, 0);
                TogglePlayerControllable(playerid, false);
                SetTimerEx("FreezeTimer", 2000, false, "i", playerid);
                SetPlayerVirtualWorld(playerid, 0);
            }
        } // !!!!! and when I want to enter the hospital or exit the hospital system doesn't react to this code below and when i press enter nothing happens.
        if(IsPlayerInRangeOfPoint(playerid, 2, 1582.5271,1761.8899,10.8203))
        {
            SetPlayerInterior(playerid, 3);
            SetPlayerPos(playerid,-204.5060,-1736.0486,675.7687);
            TogglePlayerControllable(playerid, false);
            SetTimerEx("FreezeTimer", 2000, false, "i", playerid);
        }
        if(IsPlayerInRangeOfPoint(playerid, 2, -204.4959,-1735.3291,675.7687))
        {
            if(pInfo[playerid][gydos]) return SPMB(playerid, "~r~Kaip tu iseisi?~n~Tu juk gydaisi!");
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1582.5271,1761.8899,10.8203);
            TogglePlayerControllable(playerid, false);
            SetTimerEx("FreezeTimer", 2000, false, "i", playerid);
        }
    }
    return 1;
}
Also i hope that you have mapped an interior at the coords -204.4959,-1735.3291,675.7687 because when i go there, there's nothing, so you'll fall down.
Damn man, this thing really gets crazy. I did what you said, but it still doesn't work ((((
Reply


Messages In This Thread
OnPlayerKeyStateChange - by kamiliuxliuxliux - 30.05.2014, 12:21
Re: OnPlayerKeyStateChange - by kamiliuxliuxliux - 30.05.2014, 13:48
Re: OnPlayerKeyStateChange - by Koala818 - 30.05.2014, 14:29
Re: OnPlayerKeyStateChange - by kamiliuxliuxliux - 30.05.2014, 17:28
Re: OnPlayerKeyStateChange - by Koala818 - 30.05.2014, 17:38
Re: OnPlayerKeyStateChange - by kamiliuxliuxliux - 30.05.2014, 17:44
Re: OnPlayerKeyStateChange - by Koala818 - 30.05.2014, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)