SA-MP Forums Archive
CheckPoints Problem - 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: CheckPoints Problem (/showthread.php?tid=568346)



CheckPoints Problem - Fantje - 21.03.2015

Hi ppl!

I have a problem with checkpoints.

I have 2 checkpoints close to eachother ( not too close ). 1 checkpoints is for opening a dialog. The other for capture a zone. But when I go in the checkpoint for dialog, it opens the dialog and says I am capturing. The checkpoint for capturing is gone then. HELP!


Re: CheckPoints Problem - cnoopers - 21.03.2015

You can have only one checkpoint so you should check positions to do any action on player.


Re: CheckPoints Problem - CalvinC - 21.03.2015

Show the code where you show the dialog, most likely OnPlayerEnterCheckpoint.


Re: CheckPoints Problem - Fantje - 21.03.2015

Quote:
Originally Posted by cnoopers
Посмотреть сообщение
You can have only one checkpoint so you should check positions to do any action on player.
This are the codes I am using:

The one from the filterscript:
PHP код:
public OnFilterScriptInit()
{
    
printf("============================================");
    
printf("|      Mike's CarShop Loaded!    |");
    
printf("============================================");
    
Create3DTextLabel("CarShop"0x00FF00FF,88.9491,2051.5032,18.07014000);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    
CarCP[playerid] = CPS_AddCheckpoint(88.9491,2051.5032,18.07013.740);
    
CarCP[playerid] = 0;
    
SpawnedCar[playerid] = 0;
    return 
1;

The one from my GM:
PHP код:
 //snakes farm
    
CP[SNAKE] = CreateDynamicCP(-36.54582347.642624.1406,3, -1,-1,-1,100.0);
    
Zone[SNAKE] = GangZoneCreate(-62.5000000000005,2318.359375,23.4375,2390.625);
    
//area 51
    
CP[BIG] = CreateDynamicCP(10.9908,2008.8751,17.6406,3, -1,-1,-1,100.0);
    
Zone[BIG] = GangZoneCreate(-66.875,1900.265625,100.828125,2115.234375);
    
//army hotel
    
CP[ARMY] = CreateDynamicCP(37.7949,2242.1582,126.4790,3, -1,-1,-1,100.0);
    
Zone[ARMY] = GangZoneCreate(-2.3932912210.00732469.6067042274.007324);
    
//Airport
    
CP[AIRPORT] = CreateDynamicCP(408.1432,2450.1574,16.5,3, -1,-1,-1,100.0);
    
Zone[AIRPORT] = GangZoneCreate(89.0625000000005,2418.75,466.40625,2617.96875); 



Re: CheckPoints Problem - Fantje - 21.03.2015

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
Show the code where you show the dialog, most likely OnPlayerEnterCheckpoint.
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
Car[playerid] == 0)
    {
       
PlayerPlaySound(playerid10570.00.00.0);
       
ShowPlayerDialog(playerid2386DIALOG_STYLE_LIST"Cars""Landstalker  ($125,000)\nElegy ($200,000)\nInfernus  ($500,000)\nSultan   ($350,000)\nFlash   ($300,000)\nBuffalo   ($475,000)\nMonster   ($775,000)\nCheetah   ($375,555)\nSlamvan   ($430,000)\nFortune   ($450,550)\nBullet   ($475,550)\nAdmiral   ($175,000)\nHotknife   ($490,000)\nElegant   ($403, 500)\nSuper-Gt   ($498,500)\nZr-350   ($475,550)""Buy""Cancel");
       
Car[playerid] = 0;
    }
    return 
1;




Re: CheckPoints Problem - Fantje - 21.03.2015

anyone?