[Tutorial] Cum sa creezi o poarta [ SA:MP 0.3.7 ] + miscarea acesteia
#3

Alta metoda cu timer

Код:
public OnGameModeInit()
{
	new poarta = CreateObject(980, 2720.20020, -2405.67432, 12.53250,   0.00000, 0.00000, 89.00000); //Obiectul
	return 1;
CMD:opengate(playerid, params[])
{
	if (!IsPlayerInRangeOfPoint(playerid, 10.0, 2720.20020, -2405.67432, 12.53250)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not at the LS Port Gate!"); // verifica daca esti in apropierea portii
    SendClientMessage(playerid, 0xFFFFFFFF, "Los Santos Port Gate has been opened. Closing after 10 seconds!");
    SetTimer("closegatelsport", 10000, false);// Incepe un timer de 10 secunde
    MoveObject(poarta, 2720.59888, -2395.50293, 12.53250, 00.00000); // muta obiectul
	return 1;
}
forward closegatelsport();
public closegatelsport()
{
    MoveObject(poarta, 2720.20020, -2405.67432, 12.53250, 00.00000); //inchide poarta dupa 10 secunde
}
}
Reply


Messages In This Thread
Cum sa creezi o poarta [ SA:MP 0.3.7 ] + miscarea acesteia - by QuizakaBeto - 17.12.2017, 18:15
Re: Cum sa creezi o poarta [ SA:MP 0.3.7 ] + miscarea acesteia - by edyun - 21.12.2017, 13:40
Re: Cum sa creezi o poarta [ SA:MP 0.3.7 ] + miscarea acesteia - by BlackGamer04 - 08.01.2018, 16:31

Forum Jump:


Users browsing this thread: 1 Guest(s)