[Include] Checkpoint-Include by 'Pawno.
#1

Hello.

Welcome to the thread of my first include ever.
I made this include because i got some problems making checkpoints (for jobs and other) so i make this checkpoint.

Sorry for my bad english, because i live in germany and dont speak english very well!

What can i do with this Include?
With this include you can set checkpoints, and you can return the Checkpoint-ID, which must be defined in your script.
You can also set an checkpoint-type so you can better make systems like truck-systems.
Here's an little example
pawn Код:
#define CHECKPOINT_DRIVINGSCHOOL_1  1
#define CHECKPOINT_DRIVINGSCHOOL_2  2

#define CHECKPOINT_TYPE_DRIVINGSCHOOL 1

public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPlayerCheckpointType(playerid) == CHECKPOINT_TYPE_DRIVINGSCHOOL)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(vehicleid == plSchoolCar[playerid])
        {
            switch(GetPlayerCheckpointID(playerid))
            {
                case CHECKPOINT_DRIVINGSCHOOL_1: SetPlayerCheckpointEx(playerid, 1337.0000, 1337.0000, 1337.0000, 5.0, CHECKPOINT_DRIVINGSCHOOL_2, CHECKPOINT_TYPE_DRIVINGSCHOOL);
                case CHECKPOINT_DRIVINGSCHOOL_2:
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Congratiulations, you have passed the Driving test.");
                }
            }
        }
    }
    return 1;
}
Here are all the functions with the related declarations:
pawn Код:
SetPlayerCheckpointEx(playerid, Float:posX, Float:posY, Float:posZ, Float:cpSize, CheckPointID, CheckPointType);
DisablePlayerCheckpointEx(playerid);
GetPlayerCheckpointID(playerid);
GetPlayerCheckpointType(playerid);
Special!!
Theres an simple bug in SA-MP, so i have included an timer.
If you create an checkpoint with an size of "5.0" and if you create an other checkpoint (size "2.0", before you delete the old,
the new checkpoint gets the size "5.0". The Include fixes that.

I hope you like this include.

Information
I need an good translator from german to english, so i can make an better thread here.
Pls send me an PM.

Pastebin
Click here
Reply


Messages In This Thread
Checkpoint-Include by 'Pawno. - by 'Pawno. - 31.08.2012, 12:38
AW: Checkpoint-Include by 'Pawno. - by 'Pawno. - 01.09.2012, 14:07
Re: Checkpoint-Include by 'Pawno. - by fiki574 - 01.09.2012, 14:16
Re: Checkpoint-Include by 'Pawno. - by Marko Koprivanac - 01.09.2012, 18:40
AW: Checkpoint-Include by 'Pawno. - by 'Pawno. - 03.09.2012, 00:01
AW: Checkpoint-Include by 'Pawno. - by 'Pawno. - 08.09.2012, 11:37
Re: AW: Checkpoint-Include by 'Pawno. - by Glint - 11.09.2012, 11:29
AW: Checkpoint-Include by 'Pawno. - by 'Pawno. - 14.09.2012, 20:00
Re: Checkpoint-Include by 'Pawno. - by Kaperstone - 14.09.2012, 21:26
Re: Checkpoint-Include by 'Pawno. - by 'Pawno. - 20.02.2014, 04:34

Forum Jump:


Users browsing this thread: 1 Guest(s)