Loop bug (Pickups/Checkpoints)
#1

I tried to make a loop on pickups, before few days it works currently and now it doesn't works, I change it to dynamic checkpoints and still nothing.
PHP код:
// Top of mode
new Pu[sizeof(InteriorInfo)+1];
// OnGameModeInit
for(new isizeof(InteriorInfo); i++)
    {
        
Pu[i] = CreatePickup(InteriorInfo[i][PickupID], 1InteriorInfo[i][OutsideX], InteriorInfo[i][OutsideY], InteriorInfo[i][OutsideZ], -1);
        
Pu2[i] = CPS_AddCheckpoint(InteriorInfo[i][InsideX], InteriorInfo[i][InsideY], InteriorInfo[i][InsideZ],1,5);
        
format(Info[Str],100,"%s\nID: %d",InteriorInfo[i][Name],i);
        
Create3DTextLabel(Info[Str], 0xB5B205FFInteriorInfo[i][OutsideX], InteriorInfo[i][OutsideY], InteriorInfo[i][OutsideZ]+0.55.000);
    }
//OnPlayerPickupPickup
public OnPlayerPickUpPickup(playeridpickupid)
{
    for(new 
isizeof(InteriorInfo); i++)
    {
        if(
pickupid == Pu[i])
        {
            
CurrentPu[playerid] = i;
            
SetPlayerVirtualWorldEx(playerid,i);
            
SetPlayerInterior(playerid,InteriorInfo[i][Interior]);
            
SetPlayerPos(playerid,InteriorInfo[i][InsideX],InteriorInfo[i][InsideY]+2.5,InteriorInfo[i][InsideZ]);
        }
    }
    if(
pickupid == PoliceRoofEnter)
    {
        
SetPlayerPos(playerid,1576.6730,-1640.7507,28.4021);
    }
    else if(
pickupid == PoliceRoofExit)
    {
        
SetPlayerPos(playerid,1601.4784,-1633.4667,13.7188);
    }
    return 
1;

Reply


Messages In This Thread
Loop bug (Pickups/Checkpoints) - by RedSnow - 21.07.2014, 09:24
Re: Loop bug (Pickups/Checkpoints) - by osman2571 - 21.07.2014, 09:28
Re: Loop bug (Pickups/Checkpoints) - by RedSnow - 21.07.2014, 09:30
Re: Loop bug (Pickups/Checkpoints) - by osman2571 - 21.07.2014, 09:35
Re: Loop bug (Pickups/Checkpoints) - by RedSnow - 21.07.2014, 10:39
Re: Loop bug (Pickups/Checkpoints) - by RedSnow - 22.07.2014, 08:03
Re: Loop bug (Pickups/Checkpoints) - by RedSnow - 22.07.2014, 10:26
Re: Loop bug (Pickups/Checkpoints) - by RedSnow - 22.07.2014, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)