DynamicCP problem
#1

I've been making the DynamicCPs one by one and they worked.Players could enter them and get teleported to the interiors but when I finished all of them, everything compiled good but only "some" players can enter them, I myself can't.I have been trying to fix this bug for days and nothing, I have no clue whats the problem.

Here is the OnPlayerEnterDynamicCP, I am not sure the bug is here or not but I will post anything you guys think the problem is in.

PHP код:
public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    new 
tickCountResult GetTickCount(), reducedValue;
    for(new 
iMAX_CHECKPOINTi++)
    {
        if(
checkpointid == CPIndex[i][0])
        {
            
reducedValue tickCountResult pInfo[playerid][CPTime];
            if (
reducedValue 10000)
            {
                
pInfo[playerid][CPTime] = GetTickCount();
                
SetPlayerPos(playeridCPData[i][ExitLoc][0], CPData[i][ExitLoc][1], CPData[i][ExitLoc][2]);
                
SetPlayerInterior(playeridCPData[i][Interior]);
                
SetPlayerVirtualWorld(playeridCPData[i][World]);
                
Loading(playerid);
                
pInfo[playerid][LastEntered] = i;
            }
            return 
1;
        }
        if(
checkpointid == CPIndex[i][1])
        {
            
reducedValue tickCountResult pInfo[playerid][CPTime];
            if (
reducedValue 10000)
            {
                new 
sID pInfo[playerid][LastEntered];
                
pInfo[playerid][CPTime] = GetTickCount();
                
SetPlayerPos(playeridCPData[sID][EnterLoc][0], CPData[sID][EnterLoc][1], CPData[sID][EnterLoc][2]);
                
SetPlayerInterior(playerid0);
                
SetPlayerVirtualWorld(playerid0);
                
Loading(playerid);
            }
            return 
1;
        }
    }
    if(
checkpointid == JobCP[0])
    {
        
reducedValue tickCountResult pInfo[playerid][CPTime];
          if (
reducedValue 10000)
        {
            
pInfo[playerid][CPTime] = GetTickCount();
            
SetPlayerPos(playerid384.808624,173.804992,1008.382812);
            
SetPlayerInterior(playerid3);
            
SetPlayerVirtualWorld(playerid27);
        }
        return 
1;
    }
    if(
checkpointid == JobCP[1])
    {
         
reducedValue tickCountResult pInfo[playerid][CPTime];
        if (
reducedValue 10000)
        {
            
pInfo[playerid][CPTime] = GetTickCount();
            
SetPlayerPos(playerid, -1880.8790822.750535.1774);
            
SetPlayerInterior(playerid0);
            
SetPlayerVirtualWorld(playerid0);
            
        }
        return 
1;
    }
    return 
1;

and here is the dynamicCP
PHP код:
public DynamicCPs()
{
    new 
0;
    while(
MAX_CHECKPOINT)
    {
        
CPIndex[i][0] = CreateDynamicCP(CPData[i][EnterLoc][0], CPData[i][EnterLoc][1], CPData[i][EnterLoc][2], 1.5, -1, -1, -1100.0);
        
CPIndex[i][1] = CreateDynamicCP(CPData[i][ExitLoc][0], CPData[i][ExitLoc][1], CPData[i][ExitLoc][2], 1.5CPData[i][World], CPData[i][Interior], -1100.0);
        
CPLabel[i][0][0] = Create3DTextLabel("WELCOME TO"0x00FF00FFCPData[i][EnterLoc][0], CPData[i][EnterLoc][1], CPData[i][EnterLoc][2] + 0.225.001);
        
CPLabel[i][0][1] = Create3DTextLabel(CPData[i][SName], 0x0000FFFFCPData[i][EnterLoc][0], CPData[i][EnterLoc][1], CPData[i][EnterLoc][2] + 0.0525.001);
        
CPLabel[i][1][0] = Create3DTextLabel("YOU WERE AT"0x00FF00FFCPData[i][ExitLoc][0], CPData[i][ExitLoc][1], CPData[i][ExitLoc][2] + 0.27.5CPData[i][World], 1);
        
CPLabel[i][1][1] = Create3DTextLabel(CPData[i][SName], 0x0000FFFFCPData[i][ExitLoc][0], CPData[i][ExitLoc][1], CPData[i][ExitLoc][2] + 0.057.5CPData[i][World], 1);
        
i++;
    }

here is the enum is needed
PHP код:
enum CPsEnum
{
    
SID,
    
Float:EnterLoc[3],
    
Float:ExitLoc[3],
    
World,
    
Interior,
    
SName[25]

Reply


Messages In This Thread
DynamicCP problem - by Quinncell - 19.07.2016, 12:13
Re: DynamicCP problem - by Quinncell - 19.07.2016, 12:31
Re: DynamicCP problem - by Quinncell - 19.07.2016, 13:33
Re: DynamicCP problem - by Sew_Sumi - 19.07.2016, 13:46
Re: DynamicCP problem - by Quinncell - 19.07.2016, 13:52
Re: DynamicCP problem - by RIDE2DAY - 19.07.2016, 14:06
Re: DynamicCP problem - by Sew_Sumi - 19.07.2016, 14:06
Re: DynamicCP problem - by Quinncell - 19.07.2016, 14:18
Re: DynamicCP problem - by Sew_Sumi - 19.07.2016, 14:31
Re: DynamicCP problem - by Quinncell - 19.07.2016, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)