27.01.2013, 15:12
I fixed it:
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new Gate1;
public OnFilterScriptInit()
{
Gate1 = CreateObject(object 980, 2497.6499, 2773.2900, 12.5600, 0.0000, 0.0000, 90.0000, 100.0);// I am not sure if I know the last one
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/opengate", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, 2497.6499, 2773.2900, 12.5600)){ //You MUST add the original pos defined in step 6
MoveObject(LSPDGate, 2497.6499, 2773.2900, 6.9000, 0.0000, 0.0000, 90.0000 0.0); // dunno the last one
return 1;
}
}
else if(strcmp(cmdtext, "/closegate", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, 2497.6499, 2773.2900, 12.5600)){
MoveObject(LSPDGate, 2497.6499, 2773.2900, 12.5600 3.0, 0.0000, 0.0000, 90.0000);
return 1;
}
}
return 0;
}
public OnFilterScriptExit()
{
return 1;
}
#endif