Exit CP no work
#10

In my old gm, which was as follows:

pawn Код:
if(checkpointid == SkinSEnt)
    {
        if(SpawnCP[playerid] == 0)
        {
            if(!IsPlayerInAnyVehicle(playerid))
            {
                SetPlayerInterior(playerid, 3);
                SetPlayerVirtualWorld(playerid, 45);
                SetPlayerPos(playerid, 207.0771, -140.1690, 1003.5078);
                SetPlayerFacingAngle(playerid, 360);
                SetCameraBehindPlayer(playerid);
                CargarObjetos(playerid);
                SpawnCP2[playerid] = 1;
            }
        return 1;
        }
    }
    else if(checkpointid == SkinSExit)
    {
        if(SpawnCP2[playerid] == 0)
        {
        SetPlayerInterior(playerid,0);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerPos(playerid, -1980.7328, 93.5556, 27.6875);
        SetPlayerFacingAngle(playerid, 85);
        SetCameraBehindPlayer(playerid);
        CargarObjetos(playerid);
        SpawnCP[playerid] = 1;
        return 1;
        }
    }
And onplayerleavedynamiccp

pawn Код:
if(checkpointid == SkinSEnt)
    {
        SpawnCP[playerid] = 0;
        return 1;
    }

    if(checkpointid == SkinSExit)
    {
        SpawnCP2[playerid] = 0;
        return 1;
    }
only now, better want my code to do less lines

the function of this is that it can appear inside the checkpoint without being teleported again, not having to set the coordinates to go outside the checkpoint

sorry for my english
Reply


Messages In This Thread
Exit CP no work - by Cerealguy - 16.01.2015, 06:46
Re: Exit CP no work - by amirab - 16.01.2015, 07:41
Respuesta: Re: Exit CP no work - by Cerealguy - 16.01.2015, 07:55
Respuesta: Exit CP no work - by Cerealguy - 16.01.2015, 09:11
Re: Exit CP no work - by mahdi499 - 16.01.2015, 11:44
Respuesta: Exit CP no work - by Cerealguy - 16.01.2015, 17:52
Re: Exit CP no work - by xVIP3Rx - 16.01.2015, 18:09
Respuesta: Exit CP no work - by Cerealguy - 16.01.2015, 18:31
Re: Exit CP no work - by xVIP3Rx - 16.01.2015, 18:45
Respuesta: Exit CP no work - by Cerealguy - 16.01.2015, 19:23

Forum Jump:


Users browsing this thread: 1 Guest(s)