10.08.2011, 11:33
https://sampwiki.blast.hk/wiki/CreateObject
X, Y, Z - this is coordinations of your gate. To make it.. example for move you need to make this:
X, Y, Z - this is coordinations of your gate. To make it.. example for move you need to make this:
pawn Код:
#include "a_samp"
new MyMovableGate;
public OnGameModeInit()
{
MyMovableGate = CreateObject(modelid, X, Y, Z, rX, rY, rZ, DrawDistance);
return true;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/openmygate", cmdtext, true, 10) == 0)
{
MoveObject(MyMovableGate, X, Y, Z, Speed); // X, Y, Z of the gate opened.
return true;
}
if(strcmp("/closemygate", cmdtext, true, 11) == 0)
{
MoveObject(MyMovableGate, X, Y, Z, Speed); // X, Y, Z of the gate closed.
return true;
}
// Speed should be 4.0.
return false;
}