27.09.2013, 12:52
So, let's start
add this to mod start after forward's and define's:
now add our object to public OnPlayerGameInit() :
create a command for opening gates:
create time public:
add this to mod start:
and they public:
*Replace all coords(x,y,z)
Sorry for my bad knowledge of English
add this to mod start after forward's and define's:
PHP Code:
new ao;
PHP Code:
ao = CreateObject(18783,2761.6459961,1183.8050537,12.3129997,90.0000000,180.0054932,269.9670410);// this closed gate position
PHP Code:
CMD:agateopen(playerid, params[])
{
SendClientMessage(playerid,0xFFFFFFFF,"You open a gate, they closed after 15 sec.");
MoveObject(ao, 2761.6459961,1183.8050537,27.3129997,5.00); // Open gate position(they opening up)
SetTimer("agate", 15000, 0); //timer for 15 sec
return 1;
}
add this to mod start:
PHP Code:
forward agate(playerid);
PHP Code:
public agate(playerid)
{
MoveObject(ao, 2761.6459961,1183.8050537,12.3129997,5.00); // Close gate position(x,y,z from ongamemodeinit)
SendClientMessage(playerid,0xFFFFFFFF,"Gate is closed.");
return 1;
}
Sorry for my bad knowledge of English