SA-MP Forums Archive
Multiple Checkpoint + Streamer [NEED HELP] - 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: Multiple Checkpoint + Streamer [NEED HELP] (/showthread.php?tid=570108)



Multiple Checkpoint + Streamer [NEED HELP] - Chausar - 05.04.2015

i need help with multiple checkpoint. i ******d it and cant find it somewhere... i followed the tutorial given by YuryFury ([TUT]Multiple Checkpoints Without Streamer!) but can't get it worked.

many said use streamer instead because it easy.. CreateDynamicCP ..can you guys post me the code for multiple checkpoint and the details? thankyou!


Re: Multiple Checkpoint + Streamer [NEED HELP] - Ritzy2K - 05.04.2015

what do you need help with? explain and also try to make them yourself and show the code which you have tried so we can further help you and can view your trial.
this way ull understand this better.. i hate spoon feeding xD


Re: Multiple Checkpoint + Streamer [NEED HELP] - Chausar - 05.04.2015

heres the example i found on forum. i want to create like this but i need the full code. can you help me?

Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == mycheckpoint1)
    {
        SetPlayerPos(playerid, x, y, z);
    }
    if(checkpointid == mycheckpoint2)
    {
        GivePlayerMoney(playerid, 1000);
    }
    return 1;
}



Re: Multiple Checkpoint + Streamer [NEED HELP] - ATGOggy - 05.04.2015

Use streamer's CreateDynamicCP like this:
PHP код:
new mycheckpoint1;
OnGameModeInit()
{
    
mycheckpoint=CreateDynamicCP(......................);
}
OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
checkpointid==mycheckpoint1)
    {
         
SetPlayerPos(playeridxyz);
    }
    return 
1;

This is that function:
pawn Код:
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
And don't forget to add this on the top of your script:
pawn Код:
#include <streamer>



Re: Multiple Checkpoint + Streamer [NEED HELP] - Chausar - 05.04.2015

Lol When i touched the marker nothing happened

Код:
new VBMEnter;
new VBMExit;
Код:
VBMEnter = CreateDynamicCP(1124.9746,-2036.8936,69.8826, -1, -1, -1, -1, 100);
  VBMExit = CreateDynamicCP(1298.9244,-796.3924,1084.0078, -1, -1, -1, -1, 100);
Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
	if(checkpointid == VBMEnter)
	{
		SetPlayerInterior(playerid, 5);
		SetPlayerPos(playerid,1267.663208,-781.323242,1091.906250);
	}
	if(checkpointid == VBMExit)
	{
	  SetPlayerInterior(playerid, 0);
	  SetPlayerPos(playerid,1298.9244,-796.3924,1084.0078);
	}
	return 1;
}
and yes. I did #include <streamer>


Re: Multiple Checkpoint + Streamer [NEED HELP] - ATGOggy - 06.04.2015

Where did you put these lines?
PHP код:
VBMEnter CreateDynamicCP(1124.9746,-2036.8936,69.8826, -1, -1, -1, -1100);
  
VBMExit CreateDynamicCP(1298.9244,-796.3924,1084.0078, -1, -1, -1, -1100); 



Re: Multiple Checkpoint + Streamer [NEED HELP] - Chausar - 10.04.2015

Under public OnGameModeInit()