15.07.2016, 19:51
(
Последний раз редактировалось EsperZ; 15.07.2016 в 20:38.
)
I found a system that can create a CP in an entry, exit and robbery point of a store. But since I'm having problems with the robbery point, I decided to delete it. Anyways, the CPs works good, but they don't actually teleport you to any position. Here are some things that I have for the system:
This is the OnPlayerEnterDynamicCP public.
I don't know if the problem is here. If not I'll post anything else.
Any help would be appreciated. Thanks in advance
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid) { new tickCountResult = GetTickCount(), reducedValue; if(!IsPlayerInAnyVehicle(playerid)) { for(new i; i < MAX_CHECKPOINT; i++) { if(checkpointid == CPIndex[i][0]) { reducedValue = tickCountResult - pInfo[playerid][CPTime]; if (reducedValue > 10000) { pInfo[playerid][CPTime] = GetTickCount(); SetPlayerPos(playerid, CPData[i][ExitLoc][0], CPData[i][ExitLoc][1], CPData[i][ExitLoc][2]); SetPlayerInterior(playerid, CPData[i][Interior]); SetPlayerVirtualWorld(playerid, CPData[i][World]); Loading(playerid); pInfo[playerid][LastEntered] = i; } } if(checkpointid == CPIndex[i][1]) { reducedValue = tickCountResult - pInfo[playerid][CPTime]; if (reducedValue > 10000) { new sID = pInfo[playerid][LastEntered]; pInfo[playerid][CPTime] = GetTickCount(); SetPlayerPos(playerid, CPData[sID][EnterLoc][0], CPData[sID][EnterLoc][1], CPData[sID][EnterLoc][2]); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); Loading(playerid); } } } } return 1; }
I don't know if the problem is here. If not I'll post anything else.
Any help would be appreciated. Thanks in advance