[HELP] Checkpoints
#1

I've a problem! When I start the tutorial by going into a Icon, there shows up a Dialog and by hitting "ok" u start the tutorial.

Now my prob is: it shows up the first checkpoint i.e bsn, when I am at the checkpoint, it doesnt show the next one and I get the message of all checkpoints... how I fix that??

http://www.abload.de/img/1123w8k48.png

here the code

PHP код:
        if(response==1)
        {
            
TutCP[playerid]=1;
            
SetPlayerCheckpoint(playerid,1191.9098,-920.0125,42.8168,3.0);
            
SendClientMessage(playerid,green,"You've started the Tutorial. Please follow the Checkpoints!");
        } 
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
TutCP[playerid]==1)
    {
        
DisablePlayerCheckpoint(playerid);
        
TutCP[playerid] = 2;
        
SetPlayerCheckpoint(playerid1543.8728,-1669.8749,13.23003.0);
        
SendClientMessage(playerid,green,"This is the BurgerShot North! Here you can fill up your HP by eating");
        
SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
    }
    if(
TutCP[playerid]==2)
    {
        
DisablePlayerCheckpoint(playerid);
        
TutCP[playerid] = 3;
        
SetPlayerCheckpoint(playerid1483.7485,-1764.6368,18.79583.0);
        
SendClientMessage(playerid,green,"Here is the Los Santos Police Department! If you get problems, they'll help you. Please respect them.");
        
SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
    }
    if(
TutCP[playerid]==3)
    {
         
DisablePlayerCheckpoint(playerid);
        
TutCP[playerid] = 4;
        
SetPlayerCheckpoint(playerid1348.5499,-1752.1724,13.36113.0);
        
SendClientMessage(playerid,green,"Here is the Los Santos Office. Here you find Jobs and create your identity card");
        
SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
    }
    if(
TutCP[playerid]==4)
    {
        
DisablePlayerCheckpoint(playerid);
        
TutCP[playerid] = 5;
        
SetPlayerCheckpoint(playerid1363.9559,-1285.0071,13.54693.0);
        
SendClientMessage(playerid,green,"This is the 24/7 shop. Here you can buy a mobile phone, some snacks and more..!");
        
SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
    }
    if(
TutCP[playerid]==5)
    {
        
DisablePlayerCheckpoint(playerid);
        
TutCP[playerid] = 6;
        
SetPlayerCheckpoint(playerid777.0124,-1388.1178,13.63353.0);
        
SendClientMessage(playerid,green,"Here is the LS Ammunation! You can buy guns here. But first, you'll need a gun license.");
        
SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
    }
    if(
TutCP[playerid]==6)
    {
        
DisablePlayerCheckpoint(playerid);
        
TutCP[playerid] = 7;
        
SetPlayerCheckpoint(playerid488.8225,-1520.5413,19.88183.0);
        
SendClientMessage(playerid,green,"Here is the Car-Shop. You can buy cars here, but first you'll need a drivers license");
        
SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
    }
    if(
TutCP[playerid]==7)
    {
        
DisablePlayerCheckpoint(playerid);
        
TutCP[playerid]=0;
        
SendClientMessage(playerid,green,"This is the driving school in Los Santos. You've also done the Tutorial by now.");
    }
    return 
1;

Reply
#2

anybody can help?
Reply
#3

Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(TutCP[playerid]==1)
    {
        DisablePlayerCheckpoint(playerid);
        TutCP[playerid] = 2;
        SetPlayerCheckpoint(playerid, 1543.8728,-1669.8749,13.2300, 3.0);
        SendClientMessage(playerid,green,"This is the BurgerShot North! Here you can fill up your HP by eating");
        SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
        return 1;
    }
    if(TutCP[playerid]==2)
    {
        DisablePlayerCheckpoint(playerid);
        TutCP[playerid] = 3;
        SetPlayerCheckpoint(playerid, 1483.7485,-1764.6368,18.7958, 3.0);
        SendClientMessage(playerid,green,"Here is the Los Santos Police Department! If you get problems, they'll help you. Please respect them.");
        SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
        return 1;
    }
    if(TutCP[playerid]==3)
    {
         DisablePlayerCheckpoint(playerid);
        TutCP[playerid] = 4;
        SetPlayerCheckpoint(playerid, 1348.5499,-1752.1724,13.3611, 3.0);
        SendClientMessage(playerid,green,"Here is the Los Santos Office. Here you find Jobs and create your identity card");
        SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
        return 1;
    }
    if(TutCP[playerid]==4)
    {
        DisablePlayerCheckpoint(playerid);
        TutCP[playerid] = 5;
        SetPlayerCheckpoint(playerid, 1363.9559,-1285.0071,13.5469, 3.0);
        SendClientMessage(playerid,green,"This is the 24/7 shop. Here you can buy a mobile phone, some snacks and more..!");
        SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
        return 1;
    }
    if(TutCP[playerid]==5)
    {
        DisablePlayerCheckpoint(playerid);
        TutCP[playerid] = 6;
        SetPlayerCheckpoint(playerid, 777.0124,-1388.1178,13.6335, 3.0);
        SendClientMessage(playerid,green,"Here is the LS Ammunation! You can buy guns here. But first, you'll need a gun license.");
        SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
        return 1;
    }
    if(TutCP[playerid]==6)
    {
        DisablePlayerCheckpoint(playerid);
        TutCP[playerid] = 7;
        SetPlayerCheckpoint(playerid, 488.8225,-1520.5413,19.8818, 3.0);
        SendClientMessage(playerid,green,"Here is the Car-Shop. You can buy cars here, but first you'll need a drivers license");
        SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
        return 1;
    }
    if(TutCP[playerid]==7)
    {
        DisablePlayerCheckpoint(playerid);
        TutCP[playerid]=0;
        SendClientMessage(playerid,green,"This is the driving school in Los Santos. You've also done the Tutorial by now.");
        return 1;
    }
    return 1;
}
try like this... u didnt have return 1; after each cp which meant it was going from 1 to the next untill it finished everything.. this should work fine i think
Reply
#4

Gonna try this, thanks for answer. Tell you then if it works :P
Reply
#5

Working! Much thanks x3
Reply
#6

Clearly version but Tika is good too

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(1 <= TutCP[playerid] <= 7)
    {
        TutCP[playerid]++;
        DisablePlayerCheckpoint(playerid);
        switch(TutCP[playerid]-1)
        {
            case 1:
            {
                SetPlayerCheckpoint(playerid, 1543.8728,-1669.8749,13.2300, 3.0);
                SendClientMessage(playerid,green,"This is the BurgerShot North! Here you can fill up your HP by eating");
                SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
            }
            case 2:
            {
                SetPlayerCheckpoint(playerid, 1483.7485,-1764.6368,18.7958, 3.0);
                SendClientMessage(playerid,green,"Here is the Los Santos Police Department! If you get problems, they'll help you. Please respect them.");
                SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
            }
            case 3:
            {
                SetPlayerCheckpoint(playerid, 1348.5499,-1752.1724,13.3611, 3.0);
                SendClientMessage(playerid,green,"Here is the Los Santos Office. Here you find Jobs and create your identity card");
                SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
            }
            case 4:
            {
                SetPlayerCheckpoint(playerid, 1363.9559,-1285.0071,13.5469, 3.0);
                SendClientMessage(playerid,green,"This is the 24/7 shop. Here you can buy a mobile phone, some snacks and more..!");
                SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
            }
            case 5:
            {
                SetPlayerCheckpoint(playerid, 777.0124,-1388.1178,13.6335, 3.0);
                SendClientMessage(playerid,green,"Here is the LS Ammunation! You can buy guns here. But first, you'll need a gun license.");
                SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
            }
            case 6:
            {
                SetPlayerCheckpoint(playerid, 488.8225,-1520.5413,19.8818, 3.0);
                SendClientMessage(playerid,green,"Here is the Car-Shop. You can buy cars here, but first you'll need a drivers license");
                SendClientMessage(playerid,orange,"Go on, that's not all. Find now the next Checkpoint!");
            }
            default:
            {
                TutCP[playerid] = 0;
                SendClientMessage(playerid,green,"This is the driving school in Los Santos. You've also done the Tutorial by now.");
            }
        }
        return 1;
    }
    return 0;
}
Reply
#7

Another question: you guys know if its possible to create own Interiors? And how?
Reply
#8

Yup you just need a good mapper... go into "space" far away from land and map something, then get the coords for the inside and there you have it... You can even playce the objects in a different interior (not 0 but say 10..) in MTA ...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)