How To Make Command Moving Gates -
damarpeer - 05.03.2014
Hello Guys Today Will Teach You How To Make Moving Object Like Gates
P.S: My First Tutorial
We Are Starting Now
Open Pawno , Then Click On New Then Press Ctrl + A To Select All Then Delete All
Now, Add At The Top This Line Is To Load The Include a_Samp
PHP Code:
#include <a_samp>
For Example My Gate Name Will Be castle So add
Here You Should Add The Gate Coordinates
Then Add
PHP Code:
public OnFilterScriptInit()
{
castle = CreateObject(Model ID, Cord X, Cord Y, Cord Z, Rotation X, Rotation Y, Rotation Z);
}
Here The Command You Want To Open The Gate And Close
PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/openGate"))
{
MoveObject(castle, Cord X, Cord Y, Cord Z, Float:Speed);
return 1;
}
if(!strcmp(cmdtext, "/closeGate"))
{
MoveObject(castle, Cord X, Cord Y, Cord Z, Float:Speed);
return 1;
}
return 0;
}
At The End Your File Should Be Like This
PHP Code:
#include <a_samp>
new castle;
public OnFilterScriptInit()
{
castle = CreateObject(987, -2088.1001000, 1642.6999500, 120.7000000, 0.0000000, 0.0000000, 70.9990000);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/opensesmi"))
{
MoveObject(castle, -2088.0996100, 1642.6992200, 125.7000000, 2.0);
return 1;
}
if(!strcmp(cmdtext, "/closesesmi"))
{
MoveObject(castle, -2088.1001000, 1642.6999500, 120.7000000, 2.0);
return 1;
}
return 0;
}
So Now We Done Its a Basic Tutorial But Its My First Tutorial But If It Helped You +Rep Me
Re: How To Make Command Moving Gates -
jueix - 05.03.2014
It's okay, But your not really explaining anything like what move object does, What each part is meant to do ETC. But still good.
Re: How To Make Command Moving Gates -
damarpeer - 05.03.2014
Thnx But Is It Ok For First Tutorial Cuz I didn't Make Any tutorial before
Re: How To Make Command Moving Gates -
AlonzoTorres - 05.03.2014
Might want to show them how they can implement this into their gamemodes and not only how to make a filterscript of it.