[Tutorial] Creat automatically gates from zcmd - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Creat automatically gates from zcmd (
/showthread.php?tid=466340)
Creat automatically gates from zcmd -
MarkzD - 27.09.2013
So, let's start 
add this to mod start after forward's and define's:
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(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;
}
create time public:
add this to mod start:
PHP Code:
forward agate(playerid);
and they public:
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;
}
*Replace all coords(x,y,z)
Sorry for my bad knowledge of English
Re: Creat automatically gates from zcmd -
Voxel - 27.09.2013
Very helpfull for beginners thanks!
Re: Creat automatically gates from zcmd -
An0nYm0uS - 27.09.2013
you should have explained it ...
what u did is just copy paste ...
anyway , good for the one who knows scripting but very advanced/difficult for newbie's .
Respuesta: Creat automatically gates from zcmd -
RafaelZam - 27.09.2013
use [pawn ] [/pawn ] codes :S
not php codes
but, it's nice 4.5/10
Re: Creat automatically gates from zcmd -
MarkzD - 27.09.2013
Quote:
Originally Posted by An0nYm0uS
you should have explained it ...
what u did is just copy paste ...
anyway , good for the one who knows scripting but very advanced/difficult for newbie's .
|
i am author, no copy, no paste. this gates from my server.
Re: Respuesta: Creat automatically gates from zcmd -
Team_PRO - 27.09.2013
Quote:
Originally Posted by Rafael_Zambrano
use [pawn ] [/pawn ] codes :S
not php codes
but, it's nice 4.5/10
|
same
Re: Creat automatically gates from zcmd -
XStormiest - 20.10.2013
Is not that good, also you did some mistakes
If you type this:
pawn Code:
SetTimer("agate", 15000, 0); //timer for 15 sec
, that means this timer function doesn't have any parameter:
you should do:
pawn Code:
SetTimerEx("agate", 15000, 0, "i", playerid);
Anyway 1/5 for the tutorial:
- Mistakes ( - 2 p )
- Not Good Explained ( - 2p)