using array for enter/exits etc
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
Quite possibly because you set the spawn location to the exact location of the pickup. This results in the player picking it up and the code to be executed again. You may want to use a function to slightly offset the spawn position. A variation of GetXYInFrontOfPlayer should work.
I'm using gettime to prevent them from being sent out again, this is not the issue if I understood you correctly =P


Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
pawn Код:
for(new i; i < sizeof(ALocations); i++)
        {
            if(pickupid == accessPoints[i][0])
            {
                SetPlayerPos(playerid, ALocations[i][ExiX], ALocations[i][ExiY], ALocations[i][ExiZ]);
                SetPlayerFacingAngle(playerid, ALocations[i][ExiF]);
                SetPlayerInterior(playerid, ALocations[i][Interior]);
                SetPlayerVirtualWorld(playerid, ALocations[i][Vw]);
                entertime[playerid] = gettime() + 5;
            }
            if(pickupid == accessPoints[i][1])
            {
                SetPlayerPos(playerid, ALocations[i][EntX], ALocations[i][EntY], ALocations[i][EntZ]);
                SetPlayerFacingAngle(playerid, ALocations[i][EntF]);
                SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                entertime[playerid] = gettime() + 5;
            }
I think the error lies in here. It looks like the same script is used for both cases.
It's different, notice EntX, EntY, EntZ and above is ExiX, ExiY & ExiZ
Reply


Messages In This Thread
using array for enter/exits etc - by Knekt - 28.02.2014, 07:28
Re: using array for enter/exits etc - by Aerotactics - 28.02.2014, 09:08
Re: using array for enter/exits etc - by Vince - 28.02.2014, 09:50
Re: using array for enter/exits etc - by Knekt - 28.02.2014, 10:05
Re: using array for enter/exits etc - by Knekt - 28.02.2014, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)