Jump to content
  • 0

[Problema]Bariera nu se inchide :|


ReLoaD

Question

Deci am vrut sa pun 2 bariere care sa se deschida la comanda /barrier si sa se inchida in 4 secunde, insa cand scriu /barrier se deschide bariera, totul frumos, dar dupa 4 secunde nu se mai inchide... Care e problema?

Ce am pus:

forward BarrierClose();
public BarrierClose()
{
    SetObjectRot(barrier, 0.0, 0.0, 0.2);
    SetObjectRot(barrier2, 0.0, 0.0, 0.2);
    return 1;
}
 	if (strcmp(cmdtext, "/barrier", true)==0)
	{
	 	if(PlayerToPoint(30.0,playerid,63.6878, -1524.5094, 5.1419))
	 	{
	  		SetObjectRot(barrier, 0.000000,0.000000,5.000000);
	  		SetObjectRot(barrier2, 0.000000,0.000000,5.000000);
	   		SetTimer("BarrierClose", 3500, 0);
	   		SendClientMessage(playerid, COLOR_WHITE, "Bariera s-a deschis si se va inchide peste 4 secunde !");
	   	}
	   	else
	   	{
	   	    SendClientMessage(playerid,COLOR_WHITE," Nu esti la vama!");
	   	}
		return 1;
	}
new barrier;
new barrier2;

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

poi pune si u coordonatele unde se mearga bariera cand se inchide

un MoveObject(x,y,z..) asa

public BarrierClose()
{
    SetObjectRot(barrier, 0.0, 0.0, 0.2);
    SetObjectRot(barrier2, 0.0, 0.0, 0.2);
    return 1;
}

incearca sa pui in loc de setobjectrot MoveObject si coordonatele cand gate-ul e inchis

Link to comment
Share on other sites

Guest Bogdan

Cred ca rotatia nu este buna la timer

public BarrierClose()
{
    SetObjectRot(barrier, 0.0, 0.0, 0.2);
    SetObjectRot(barrier2, 0.0, 0.0, 0.2);
    return 1;
}

ar trebui cam alta rotatie nu 0.2 , cred ca asta ar putea fi problema

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.