Checkpoint-Include by 'Pawno. -
'Pawno. - 31.08.2012
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
AW: Checkpoint-Include by 'Pawno. -
'Pawno. - 01.09.2012
Push ?
Re: Checkpoint-Include by 'Pawno. -
fiki574 - 01.09.2012
Dont know why no one answers this because this is actually pretty cool and usefull! Nice include!
Re: Checkpoint-Include by 'Pawno. -
Marko Koprivanac - 01.09.2012
Its cool,and usefull !!
NICE !
AW: Checkpoint-Include by 'Pawno. -
'Pawno. - 03.09.2012
Thx
AW: Checkpoint-Include by 'Pawno. -
'Pawno. - 08.09.2012
push^^
Re: AW: Checkpoint-Include by 'Pawno. - Glint - 11.09.2012
Quote:
Originally Posted by 'Pawno.
push^^
|
What is "push" ? I think you mean "bump" ?
AW: Checkpoint-Include by 'Pawno. -
'Pawno. - 14.09.2012
@lexi
sry, "push" comes from german forums and i dont know it before u say "bump" to me ...
#bump
Re: Checkpoint-Include by 'Pawno. -
Kaperstone - 14.09.2012
would be better if it will make his own ids,like in y_dialog.
pawn Код:
ObtainCheckPointID(Array);
Ex:
pawn Код:
new CPID;
public OnGameModeInit()
{
ObtainCheckPointID(CPID);
}
public OnPlayerEnterCheckpoint(playerid)
{
if(GetPlayerCheckpointType(playerid) == CPID)
{
}
}
Re: Checkpoint-Include by 'Pawno. -
'Pawno. - 20.02.2014
Little bump.
anyone use this?