[Tutorial] Creat automatically gates from zcmd
#1

So, let's start

add this to mod start after forward's and define's:
PHP Code:
new ao
now add our object to public OnPlayerGameInit() :
PHP Code:
ao CreateObject(18783,2761.6459961,1183.8050537,12.3129997,90.0000000,180.0054932,269.9670410);// this closed gate position 
create a command for opening gates:

PHP Code:
CMD:agateopen(playeridparams[]) 

SendClientMessage(playerid,0xFFFFFFFF,"You open a gate, they closed after 15 sec.");
MoveObject(ao2761.6459961,1183.8050537,27.3129997,5.00); // Open gate position(they opening up)
SetTimer("agate"150000); //timer for 15 sec
return 1

create time public:

add this to mod start:

PHP Code:
forward agate(playerid); 
and they public:

PHP Code:
public agate(playerid

MoveObject(ao2761.6459961,1183.8050537,12.3129997,5.00); // Close gate position(x,y,z from ongamemodeinit) 
SendClientMessage(playerid,0xFFFFFFFF,"Gate is closed."); 
return 
1

*Replace all coords(x,y,z)


Sorry for my bad knowledge of English
Reply


Messages In This Thread
Creat automatically gates from zcmd - by MarkzD - 27.09.2013, 12:52
Re: Creat automatically gates from zcmd - by Voxel - 27.09.2013, 14:43
Re: Creat automatically gates from zcmd - by An0nYm0uS - 27.09.2013, 14:53
Respuesta: Creat automatically gates from zcmd - by RafaelZam - 27.09.2013, 15:47
Re: Creat automatically gates from zcmd - by MarkzD - 27.09.2013, 16:01
Re: Respuesta: Creat automatically gates from zcmd - by Team_PRO - 27.09.2013, 16:08
Re: Creat automatically gates from zcmd - by XStormiest - 20.10.2013, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)