[INC] Checkpoint Control (Streamer) -
Rafelder_GRF - 02.07.2008
CheckpointControl
Functions:
CreateCheckpoint(Float:X, Float:Y, Float:Z, Float
ize, Float:distance, name[], bool:enable)
DestroyCheckpoint(cpid)
IsValidCheckpoint(cpid)
EnabledCheckpointForPlayer(playerid, cpid, bool:enable)*
EnabledCheckpointForAll(cpid, bool:enable)*
SetCheckpointPos(cpid, Float:X, Float:Y, Float:Z)*
SetCheckpointSize(cpid, Float
ize)*
SetCheckpointSpawnDistance(cpid, Float:distance = 9999.9)*
SetCheckpointName(cpid, name[])*
GetCheckpointPos(cpid, &Float:X, &Float:Y, &Float:Z)
GetCheckpointSize(cpid)
GetCheckpointSpawnDistance(cpid)
GetCheckpointName(cpid)
IsCheckpointEnabledForPlayer(playerid, cpid)*
IsCheckpointEnabledForAll(cpid)*
IsPlayerInAnyCheckpoint(playerid)**
IsPlayerInCheckpoint(playerid, cpid)**
GetPlayerCheckpoint(playerid)
CPC_OnPlayerConnect(playerid)
CPC_OnPlayerEnterCheckpoint(playerid)
CPC_OnPlayerLeaveCheckpoint(playerid)
Callbacks:
OnPlayerEnterCheckpointEx(playerid, cpid, name[])
OnPlayerLeaveCheckpointEx(playerid, cpid, name[])
* cpid -1 = all
** playerid -1 = all
In some functions you can use "-1".
The "-1" means "every checkpoint/player".
Example:
pawn Code:
SetCheckpointName(0, "Test"); // Changes the name of checkpoint 0
SetCheckpointName(-1, "Test"); // Changes the name of every checkpoint
Please leave a comment if you download the include ![rolleyes](images/smilies/rolleyes.gif)
/\
||
Pastebin
Re: [INC] Checkpoint Control (Streamer) -
Zh3r0 - 02.07.2008
Dude, i love it
![Cheesy](images/smilies/biggrin.png)
it's easy to use, and in scripting section was all about Checkpoints
![Cheesy](images/smilies/biggrin.png)
you saved ours life
Thanks a lot,
and great work.
Re: [INC] Checkpoint Control (Streamer) -
zombie13333 - 04.07.2008
How do I set the cpID?
Re: [INC] Checkpoint Control (Streamer) -
zombie13333 - 04.07.2008
Hey I tried to use it... Here's my resualts:
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\gamemodes\SAMPRolePlay.pwn(1881) : warning 235: public function lacks forward declaration (symbol "CPC_OnPlayerEnterCheckpoint")
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\gamemodes\SAMPRolePlay.pwn(1882) : error 021: symbol already defined: "CPC_OnPlayerEnterCheckpoint"
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\gamemodes\SAMPRolePlay.pwn(1883) : error 004: function "OnPlayerEnterCheckpointEx" is not implemented
For this code:
public CPC_OnPlayerEnterCheckpoint(playerid)
{
OnPlayerEnterCheckpointEx(playerid, 1, "cp_bank");
{
SendClientMessage(playerid, COLOR_GREEN, "***Welcome to the Bank***");
}
}
Re: [INC] Checkpoint Control (Streamer) -
Rafelder_GRF - 04.07.2008
pawn Code:
public OnPlayerEnterCheckpoint(playerid)
{
CPC_OnPlayerEnterCheckpoint(playerid);
return 1;
}
public OnPlayerEnterCheckpointEx(playerid, cpid, name[])
{
// Do something
if(cpid == cp_bank)
{
SendClientMessage(playerid, COLOR_GREEN, "***Welcome to the Bank***");
return 1;
}
return 1;
}
Re: [INC] Checkpoint Control (Streamer) -
chrisb345 - 11.07.2008
Code:
C:\Documents and Settings\Chris\Desktop\SAFR\Server\pawno\include\checkpoint.inc(433) : warning 219: local variable "x2" shadows a variable at a preceding level
C:\Documents and Settings\Chris\Desktop\SAFR\Server\pawno\include\checkpoint.inc(433) : warning 219: local variable "y2" shadows a variable at a preceding level
C:\Documents and Settings\Chris\Desktop\SAFR\Server\pawno\include\checkpoint.inc(433) : warning 219: local variable "z2" shadows a variable at a preceding level
eerrrmmm help please
Re: [INC] Checkpoint Control (Streamer) -
Rafelder_GRF - 11.07.2008
You've created x2, y2 and z2 in your script and in the include.
Re: [INC] Checkpoint Control (Streamer) -
chrisb345 - 11.07.2008
i have checked they dont exist :S
Re: [INC] Checkpoint Control (Streamer) -
Rafelder_GRF - 11.07.2008
Then it was created in another include.
Re: [INC] Checkpoint Control (Streamer) -
Zh3r0 - 11.07.2008
Or in your GM/FS