05.03.2014, 09:50
(
Last edited by damarpeer; 05/03/2014 at 10:59 AM.
Reason: Needed More INformaion
)
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
For Example My Gate Name Will Be castle So add
Here You Should Add The Gate Coordinates
Then Add
Here The Command You Want To Open The Gate And Close
At The End Your File Should Be Like This
So Now We Done Its a Basic Tutorial But Its My First Tutorial But If It Helped You +Rep Me
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>
PHP Code:
new castle;
Then Add
PHP Code:
public OnFilterScriptInit()
{
castle = CreateObject(Model ID, Cord X, Cord Y, Cord Z, Rotation X, Rotation Y, Rotation Z);
}
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;
}
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;
}