wie füge ich das in mein script ein
#include <a_samp>
#define COLOR_RED 0xAA3333AA
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#pragma tabsize 0
//forward's
forward GateClosegate111();
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
//new's
new gate111;
public OnFilterScriptInit()
{
print("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
print("haus tor ");
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
//objecte
gate111 = CreateObject(980, 261.653839, -1231.633789, 74.336357, 0.0000, 5.1566, 215.4689);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/rita1", true) == 0 )
{
MoveObject(gate111,261.818420, -1231.535034, 65.510872,4);//Aberto
SetTimer("GateClosegate111", 6000, 0);
SendClientMessage(playerid,0xFF0000FF,"Achtung");
}
return 0;
}
public GateClosegate111()
{
MoveObject(gate111,261.653839, -1231.633789, 74.336357, 4);
return 1;
}
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
#endif