07.06.2013, 23:43
(
Последний раз редактировалось ViperKill; 08.06.2013 в 17:09.
)
1-first
2-
3-
4- Put your gate
5- gate closed cmd
5-gate opened cmd
6-
* also you can added text message like:
SendClientMessage(playerid, 0xEF994300, "The gate has closed or opened.");
and a timer:
SetTimer("close", 7000, 0);//gate will be closed for 7 seconds
rep if i help you
Код:
#include <a_samp> #include <streamer>
Код:
new gate; // change gate into what you like
Код:
public OnFilterScriptInit() {
Код:
gate = CreateObject(969, 1643.41736, -1719.34143, 14.67698, 0.00000, 0.00000, 89.94525);//gate closed return 1; }
Код:
if (!strcmp("/closegate", cmdtext)) // cmd to close the gate { if(IsPlayerInRangeOfPoint(playerid, 969, 1643.41736, -1719.34143, 14.67698)) { MoveDynamicObject(gate, 1643.41736, -1719.34143, 14.67698, 1(here youu put the speed of moving), 0.00000, 0.00000,89.94525);//gate closed pos } return 1; }
Код:
if (!strcmp("/opengate", cmdtext)) // cmd to open the gate { if(IsPlayerInRangeOfPoint(playerid, 969(object id), 1643.41736, -1719.34143, 14.67698)) { MoveDynamicObject(gate, 1643.45569, -1711.34302, 14.67698, 1(speed), 0.00000, 0.00000, 89.94525);//gate opened pos } return 1; return 0; }
Код:
public OnFilterScriptExit() { return 1; }
SendClientMessage(playerid, 0xEF994300, "The gate has closed or opened.");
and a timer:
SetTimer("close", 7000, 0);//gate will be closed for 7 seconds
rep if i help you