[HELP]Problem With CheckPoints
#1

Hi!, Iґve a problem with DynamicCP-s. CP-s keeps looping, if i walk through the 1st CP, it disappears, going next CP,that disappears too, but 1st CP appears again... And its keeps appearing all over again.

Sorry for my bad english

PS: Using Incognito Streamer Plugin v2.5.1
----------------------
Pwn Code..
Код:
	else if(IsCuttingTrees[playerid] > 0)//lumberjack
	{
		if(IsCuttingTrees[playerid] == 1)
		{
		   TreeTime[playerid] += 1;
		   DestroyDynamicObject(Tree1);
	           Tree5 = CreateDynamicObject(836, -133.56973266602, -1077.5362548828, 5.9638566970825, 0.000000, 0.000000, 0.000000); // dead_tree_10
		   TogglePlayerControllable(playerid, 1);
                   DestroyDynamicCP(playerid);
        	   ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
		   ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
		   ClearAnimations(playerid);
        	   CreateDynamicCP( -130.7060, -1091.5780, 5.1056, 2.0, 0, 0, playerid, 300.0);
        	   IsCuttingTrees[playerid] = 2;
		}
	        if(IsCuttingTrees[playerid] == 2)
		{

		    TreeTime[playerid] += 1;
   		    DestroyDynamicObject(Tree2);
		    Tree6 = CreateDynamicObject(838, -129.42596435547, -1092.3234863281, 5.9592151641846, 0.000000, 0.000000, 0.000000); // dead_tree_9
		    TogglePlayerControllable(playerid, 1);
        	    DestroyDynamicCP(playerid);
                    ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
		    ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
		    ClearAnimations(playerid);
        	    CreateDynamicCP( -147.9303,-1086.8070,5.5855, 2.0, 0, 0, playerid, 300.0);
        	    IsCuttingTrees[playerid] = 3;
		}
	        if(IsCuttingTrees[playerid] == 3)
		{
		    TreeTime[playerid] += 1;//1
   		    DestroyDynamicObject(Tree3);
		    Tree7 = CreateDynamicObject(843, -150.10368347168, -1086.8353271484, 4.8431253433228, 0.000000, 0.000000, 0.000000); // dead_tree_15
		    TogglePlayerControllable(playerid, 1);
        	    DestroyDynamicCP(playerid);
        	    ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
		    ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
	      	    ClearAnimations(playerid);
        	    CreateDynamicCP( -204.3498,-1085.2990,5.8966, 2.0, 0, 0, playerid, 300.0);
        	    IsCuttingTrees[playerid] = 4;
		}
	        if(IsCuttingTrees[playerid] == 4)
		{
		    TreeTime[playerid] += 1;
		    DestroyDynamicObject(Tree4);
		    Tree8 = CreateDynamicObject(832, -205.30577087402, -1084.9542236328, 7.275707244873, 0.000000, 0.000000, 0.000000); //dead_tree_4
		    TogglePlayerControllable(playerid, 1);
		    ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
		    ApplyAnimation(playerid,"CHAINSAW","CSAW_G",4.1,0,1,1,1,1);
		    ClearAnimations(playerid);
	            DestroyDynamicCP(playerid);
	       	    SendClientMessage(playerid, COLOR_GREEN, " ** Goto the truck and head to the drop off !");
	       	    TruckOne = CreateVehicle(455,-159.0362,-1069.4888,2.5050,133.0625,-1,-1, 60000);
	            CreateDynamicCP( -14.7577,-274.7194,5.8661, 2.0, 0, 0, playerid, 300.0);
	       	    IsCuttingTrees[playerid] = 5;
		}
		if(IsCuttingTrees[playerid] == 5)
		{
                   TreeEndTime[playerid] += 1;
		   TogglePlayerControllable(playerid, 1);
	       	   DestroyDynamicCP(playerid);
	       	   SendClientMessage(playerid, COLOR_GREEN, " ** Head back to the Lumber Co. !");
	       	   CreateDynamicCP( -67.1326,-1119.4310,1.5154, 2.0, 0, 0, playerid, 300.0);
	           IsCuttingTrees[playerid] = 6;
		}
	        if(IsCuttingTrees[playerid] == 6)
		{
		   TogglePlayerControllable(playerid, 1);
	           DisablePlayerCheckpoint(playerid);
	       	   DestroyVehicle(TruckOne);
	       	   SendClientMessage(playerid, COLOR_GREEN, " ** You are finished, here your pay($200)!");
	       	   GivePlayerMoney(playerid, 200);
		}
	}
Reply
#2

Don't use PHP. This is PAWN.

lrn2read
Reply
#3

Any help with this?
Reply
#4

After taking a quick look at your code, and reading your ~symptoms~

Streamed checkpoints still appear one at a time.
I notice you have DestroyDynamicCheckpoint(playerid) in your script, this is not correct. You need to assign a variable with the checkpoint ID, and use that ID to identify the checkpoint you want to destroy
pawn Код:
new check = CreateDynamicCheckpoint( ... <insert parameters here > ... );
DestroyDynamicCheckpoint(check);
Reply
#5

It doesnt work :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)