28.01.2011, 18:09
Quote:
Can you please tell me what is wrong with this and correct it.
pawn Code:
|
pawn Code:
#include <a_samp>
new aGate;
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
aGate = CreateObject(976,2720.53076172,-2409.44506836,12.46093750,0.00000000,0.00000000,90.00000000);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp ("/gate", cmdtext, true) == 0)
{
MoveObject(aGate, 2720.53076172, -2401.33911133, 12.46093750,2);//This will move the gate
return 1;
}
if(strcmp ("/closegate", cmdtext, true) == 0)
{
MoveObject(aGate, 2720.53076172, -2409.44506836, 12.46093750, 2);//This will move the gate back to the old position
return 1;
}
return 0;
}