SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 02/03/2013, 03:48 AM   #1
Gaurav_Rawat
Big Clucker
 
Join Date: Mar 2012
Posts: 129
Reputation: 32
Default Checkpoint help

When i enter first CP the next cp doesn't appear..
Mind telling me why..maybe i made mistake :/

PHP Code:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
CPP[playerid] == 1// Drivers License Test
    
{
        if(
IsPlayerInRangeOfPoint(playerid,5,-2047.0905,-78.3515,34.9040)) // Checkpoint 1
        
{
        
              
SetPlayerCheckpoint(playerid,-2498.0962,-45.2208,25.3028,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2498.0962,-45.2208,25.3028)) // Checkpoint 2
        
{
            
SetPlayerCheckpoint(playerid,-2708.8442,-57.1813,3.9125,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2708.8442,-57.1813,3.9125)) // Checkpoint 3
        
{
            
SetPlayerCheckpoint(playerid,-2790.4324,-213.4636,6.7723,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2790.4324,-213.4636,6.7723)) // Checkpoint 4
        
{
            
SetPlayerCheckpoint(playerid,-2263.2546,-90.4397,34.9045,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2263.2546,-90.4397,34.9045)) // Checkpoint 5
        
{
            
SetPlayerCheckpoint(playerid,-2152.2449,-73.2008,34.9064,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2152.2449,-73.2008,34.9064)) // Checkpoint 6
        
{
            
SetPlayerCheckpoint(playerid,-2067.7107,-97.8147,34.9002,5);
        } 
__________________
Rep me if i helped you
Gaurav_Rawat is offline   Reply With Quote
Old 02/03/2013, 03:55 AM   #2
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 1,988
Reputation: 133
Default Re: Checkpoint help

First, try to increase the range inside IsPlayerInRangeOfPoint (And check for the first coordinate whether it's right or not).
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Old 02/03/2013, 04:45 AM   #3
Gaurav_Rawat
Big Clucker
 
Join Date: Mar 2012
Posts: 129
Reputation: 32
Default Re: Checkpoint help

the first checkpoint arrives..then
Nothing D:
__________________
Rep me if i helped you
Gaurav_Rawat is offline   Reply With Quote
Old 03/03/2013, 02:53 AM   #4
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,709
Reputation: 489
Default Re: Checkpoint help

First off all, Do you make sure you exactly in the position in order to appear the other checkpoints?
__________________
Discord: Cipher#7353
__________________


Server IP: Click me | Discord: Click me

You challenged us, What you want is what you get.
JaKe Elite is offline   Reply With Quote
Old 03/03/2013, 07:29 AM   #5
Gaurav_Rawat
Big Clucker
 
Join Date: Mar 2012
Posts: 129
Reputation: 32
Default Re: Checkpoint help

Yes i do..
The first Cp appears..but then no CP..
__________________
Rep me if i helped you
Gaurav_Rawat is offline   Reply With Quote
Old 03/03/2013, 07:57 AM   #6
L.Hudson
Huge Clucker
 
L.Hudson's Avatar
 
Join Date: Jul 2012
Location: Fairy Tail, Fiore
Posts: 226
Reputation: 16
Default Re: Checkpoint help

Try disabling the CPs you passed

pawn Code:
if(CPP[playerid] == 1) // Drivers License Test
    {
        if(IsPlayerInRangeOfPoint(playerid,5,-2047.0905,-78.3515,34.9040)) // Checkpoint 1
        {
              DisablePlayerCheckPoint(playerid);
              SetPlayerCheckpoint(playerid,-2498.0962,-45.2208,25.3028,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2498.0962,-45.2208,25.3028)) // Checkpoint 2
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2708.8442,-57.1813,3.9125,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2708.8442,-57.1813,3.9125)) // Checkpoint 3
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2790.4324,-213.4636,6.7723,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2790.4324,-213.4636,6.7723)) // Checkpoint 4
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2263.2546,-90.4397,34.9045,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2263.2546,-90.4397,34.9045)) // Checkpoint 5
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2152.2449,-73.2008,34.9064,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2152.2449,-73.2008,34.9064)) // Checkpoint 6
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2067.7107,-97.8147,34.9002,5);
        }
L.Hudson is offline   Reply With Quote
Old 03/03/2013, 08:03 AM   #7
Gaurav_Rawat
Big Clucker
 
Join Date: Mar 2012
Posts: 129
Reputation: 32
Default Re: Checkpoint help

@L.Hudson - I don't see the point there :/
Coz the only point i can see is
PHP Code:
        if(IsPlayerInRangeOfPoint(playerid,5,-2047.0905,-78.3515,34.9040)) // Checkpoint 1 
__________________
Rep me if i helped you
Gaurav_Rawat is offline   Reply With Quote
Old 03/03/2013, 08:06 AM   #8
L.Hudson
Huge Clucker
 
L.Hudson's Avatar
 
Join Date: Jul 2012
Location: Fairy Tail, Fiore
Posts: 226
Reputation: 16
Default Re: Checkpoint help

I also had this problem in the past... Try disabling the checkpoints... If you have already tried try making a value for each CheckPoints like new cp1[playerid]... etc
L.Hudson is offline   Reply With Quote
Old 04/03/2013, 10:48 AM   #9
Gaurav_Rawat
Big Clucker
 
Join Date: Mar 2012
Posts: 129
Reputation: 32
Default Re: Checkpoint help

Imma try
CP1 ..CP2 one
__________________
Rep me if i helped you
Gaurav_Rawat is offline   Reply With Quote
Old 04/03/2013, 10:56 AM   #10
Threshold
High-roller
 
Threshold's Avatar
 
Join Date: Nov 2012
Location: Australia
Posts: 3,122
Reputation: 529
Default Re: Checkpoint help

DynamicCheckpoints would be easier because it handles checkpointids...
http://forum.sa-mp.com/showthread.php?t=102865
__________________


Kar's Cops and Robbers 2020
Threshold is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
checkpoint omer5198 Help Archive 4 19/02/2011 01:34 PM
[HELP]CheckPoint bboytimix Help Archive 0 12/02/2011 09:53 AM
checkpoint on map Headshot1108 Help Archive 1 01/04/2010 12:18 PM
checkpoint help tony300 Help Archive 4 13/02/2010 07:19 PM
Checkpoint HELP Roperr Help Archive 1 12/02/2010 10:29 PM


All times are GMT. The time now is 04:03 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.