Help Checkpoints
#1

Hello
i tired make my script dynamic house and now have smail problems.
when iam leave the Exit Checkpoints bug i'm Flying on Sky
i want make Exit Checkpoints Teleport Me Dynamic To The Enter Checkpoints
Help!!
PHP код:
new house1Enthouse1Exit;
new 
house2Enthouse2Exit;
new 
house3Enthouse3Exit;
new 
house4Enthouse4Exit;
new 
house5Enthouse5Exit;
new 
house6Enthouse6Exit;
CMD:createhouse(playeridparams[])
{
    new 
interiortype[16];
    new 
Float:xFloat:yFloat:z;
    if(
sscanf(params"is[16]"interiortype))
    if(
interior 7SendClientMessage(playerid, -1"Invaild Interior ID");
    
GetPlayerPos(playeridxyz);
    if(!
strcmp(type"enter"true))
    {
        if(
interior == 1)
        {
            
house1Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
        else if(
interior == 2)
        {
            
house2Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
        if(
interior == 3)
        {
            
house3Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
        if(
interior == 4)
        {
            
house4Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
        if(
interior == 5)
        {
            
house5Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
        if(
interior == 6)
        {
            
house6Ent CreateDynamicCP(xyz2.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        }
    }
    if(!
strcmp(type"exit"true))
    {
        if(
interior == 1)
        {
            
house1Exit CreateDynamicCP(234.1368,1063.7231,1084.2123,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
        else if(
interior == 2)
        {
            
house2Exit CreateDynamicCP(225.7605,1021.4443,1084.0177,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
        else if(
interior == 3)
        {
            
house3Exit CreateDynamicCP(140.2828,1365.9211,1083.8594,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
        else if(
interior == 4)
        {
            
house4Exit CreateDynamicCP(2324.4011,-1149.5393,1050.7101,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
        else if(
interior == 5)
        {
            
house5Exit CreateDynamicCP(491.1555,1398.5007,1080.2578,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
        else if(
interior == 6)
        {
            
house6Exit CreateDynamicCP(2317.8250,-1026.7659,1050.2178,2.0,GetPlayerVirtualWorld(playerid),-1,-1,100.0);
        }
    }
    return 
1;
}
public 
OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
checkpointid == house1Ent)
    {
        
SetPlayerInterior(playerid,6);
        
SetPlayerPos(playerid,234.1586,1066.9490,1084.2075);
    }
    else if(
checkpointid == house2Ent)
    {
        
SetPlayerInterior(playerid,7);
        
SetPlayerPos(playerid,225.8389,1025.0447,1084.0078);
    }
    if(
checkpointid == house3Ent)
    {
        
SetPlayerInterior(playerid,5);
        
SetPlayerPos(playerid,140.2494,1369.8427,1083.8650);
    }
    if(
checkpointid == house4Ent)
    {
        
SetPlayerInterior(playerid,12);
        
SetPlayerPos(playerid,2324.3672,-1145.9575,1050.7101);
    }
    if(
checkpointid == house5Ent)
    {
        
SetPlayerInterior(playerid,2);
        
SetPlayerPos(playerid,491.2881,1400.8329,1080.2645);
    }
    if(
checkpointid == house6Ent)
    {
        
SetPlayerInterior(playerid,9);
        
SetPlayerPos(playerid,2317.3748,-1023.6965,1050.2109);
    }
    else if(
checkpointid == house1Exit)
    {
        
SetPlayerPos(playerid,272.884979,306.631988,999.148437);
    }
    else if(
checkpointid == house2Exit)
    {
        
SetPlayerPos(playerid,1526.229980,-11.574499,1002.097106);
    }
    else if(
checkpointid == house3Exit)
    {
        
SetPlayerPos(playerid,1526.229980,-11.574499,1002.097106);
    }
    else if(
checkpointid == house4Exit)
    {
        
SetPlayerPos(playerid,1526.229980,-11.574499,1002.097106);
    }
    else if(
checkpointid == house5Exit)
    {
        
SetPlayerPos(playerid,1526.229980,-11.574499,1002.097106);
    }
    else if(
checkpointid == house6Exit)
    {
        
SetPlayerPos(playerid,1526.229980,-11.574499,1002.097106);
    }
    return 
1;

Reply


Messages In This Thread
Help Checkpoints - by ommar8080 - 13.03.2017, 03:44
Re: Help Checkpoints - by X337 - 13.03.2017, 05:30

Forum Jump:


Users browsing this thread: 1 Guest(s)