07.01.2014, 11:35
Hi all, i want to make moving gate, but it copies itself: when i'm writing cmd to open it - it's opening but it's copying and leaving closed.
Closed:
sa-mp-000.jpg
Opened:
sa-mp-001.jpg
And code:
Closed:
sa-mp-000.jpg
Opened:
sa-mp-001.jpg
And code:
Код HTML:
#include <a_samp>
#pragma tabsize 0
#define FILTERSCRIPT
#if defined FILTERSCRIPT
new mhs;
#endif
public OnFilterScriptInit()
{
mhs = CreateObject(980,-2276.5000000,2354.1999500,6.7000000,0.0000000,0.0000000,54.0000000);
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
if (strcmp(cmdtext, "/otk", true)==0) {
MoveObject (mhs, -2276.5000000,2354.1999500,10.7000000 , 2);
return 1;
}
if (strcmp(cmdtext, "/zak", true)==0) {
MoveObject (mhs, -2276.5000000,2354.1999500,6.7000000 , 3);
return 1;
}
return 0;
}