simple question! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: simple question! (
/showthread.php?tid=521318)
simple question! -
danish007 - 22.06.2014
how can i make checkpoint for robbery.
like
OnPlayerEnterCheckPoint(playerid)
{
if(cpid == robbery)
{
//bla bla bla
}
return 1;
}
can any one teach me?
Re: simple question! -
Excel™ - 22.06.2014
https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint
Or
https://sampforum.blast.hk/showthread.php?tid=102865
Re: simple question! -
NaClchemistryK - 22.06.2014
for creating it, you need to create it under ongamemodeinit using a variable.
pawn Код:
new robcheck;
//ongamemodeinit
robcheck = SetPlayerCheckpoint(params here);
//onplayerentercheckpoint
if(checkpointid == robcheck)
{
//blablabla
}
Re: simple question! -
Konstantinos - 22.06.2014
Quote:
Originally Posted by NaClchemistryK
for creating it, you need to create it under ongamemodeinit using a variable.
pawn Код:
new robcheck;
//ongamemodeinit robcheck = SetPlayerCheckpoint(params here);
//onplayerentercheckpoint if(checkpointid == robcheck) { //blablabla }
|
SetPlayerCheckpoint does not return a checkpointid but 0/1 for failure/success. Use streamer plugin instead (CreateDynamicCP) and then check if checkpointid is the one you created.
Re: simple question! -
NaClchemistryK - 22.06.2014
I never used the normal samp checkpoint stuff, I only used the streamer's checkpoint features, so I barely know anything about the actual pawn stuff of checkpoints. thanks for correcting.
Re: simple question! -
danish007 - 22.06.2014
but streamer checkpoints only appear when we enough close to checkpoint!
Re: simple question! -
NaClchemistryK - 22.06.2014
For that, you can increase the stream distance. instead of 100.0, a higher value like 1000.0
Re: simple question! -
danish007 - 22.06.2014
aight, thanks!
Re : Re: simple question! -
Clad - 22.06.2014
Quote:
Originally Posted by danish007
but streamer checkpoints only appear when we enough close to checkpoint!
|
Use what ever you find good for you, All other things are suggestions, But you better choose streamer's.
Re: Re : Re: simple question! -
danish007 - 22.06.2014
Quote:
Originally Posted by Clad
Use what ever you find good for you, All other things are suggestions, But you better choose streamer's.
|
as NaClchemistryK said!
i'll use streamer. and i'll increase size!!