wie vie füge ich dieses fs in mein script ein und wo
#include <a_samp>
#define COLOR_RED 0xAA3333AA
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#pragma tabsize 0
//forward's
forward GateClosegatee();
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
//new's
new gatee;
public OnFilterScriptInit()
{
print("\n$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
print(" Sony's haus tor ");
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
//objecte
gatee = CreateObject(980, 831.60961914063, -866.78466796875, 70.638648986816, 0.000000, 0.000000, 21.834838867188);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/move2", true) == 0 )
{
MoveObject(gatee,831.60961914063, -866.78466796875, 62.638648986816,4);//Aberto
SetTimer("GateClosegatee", 6000, 0);
SendClientMessage(playerid,0xFF0000FF,"Achtung");
}
return 0;
}
public GateClosegatee()
{
MoveObject(gatee,831.60961914063, -866.78466796875, 70.638648986816, 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