31.08.2012, 12:38
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
Here are all the functions with the related declarations:
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
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;
}
pawn Код:
SetPlayerCheckpointEx(playerid, Float:posX, Float:posY, Float:posZ, Float:cpSize, CheckPointID, CheckPointType);
DisablePlayerCheckpointEx(playerid);
GetPlayerCheckpointID(playerid);
GetPlayerCheckpointType(playerid);
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