Hi, hab mir mal dieses Filterscript zusammengeschrieben und es funktioniert nicht ganz so, wie gewünscht.
#include <a_samp>
#pragma tabsize 0
#define COLOR_YELLOW 0xFFFF00AA
#define FILTERSCRIPT
#define PlayerToPoint
#if defined FILTERSCRIPT
new pdls_gate;
new pdsf_gate;
new pdlv_gate;
public OnFilterScriptInit()
{
pdls_gate = CreateObject(7657, 1547.188843, -1642.849487, 14.099655, 0.0000, 0.0000, 269.7591);
pdsf_gate = CreateObject(976, -1571.564331, 658.912109, 6.349410, 0.0000, 0.0000, 269.7591);
pdlv_gate = CreateObject(976, 2237.098145, 2457.347168, 9.940882, 0.0000, 0.0000, 89.3814);
print("\n-------------------");
print("-Filterscript-Test-");
print("-------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/pdlsclose", true) == 0){
if (PlayerToPoint(10.0, playerid, 1547.213867, -1627.848999, 14.099655))
MoveObject(pdls_gate,1547.213867, -1627.848999, 14.099655,5);
return 1;
}
if (strcmp(cmdtext, "/pdlsopen", true) == 0){
if (PlayerToPoint(10.0, playerid, 1547.213867, -1627.848999, 14.099655))
MoveObject(pdls_gate,1547.188843, -1642.849487, 14.099655,5);
return 1;
}
if (strcmp(cmdtext, "/pdsfclose", true) == 0){
if (PlayerToPoint(10.0, playerid, -1571.564331, 665.585815, 6.349410))
MoveObject(pdsf_gate,-1571.564331, 665.585815, 6.349410,5);
return 1;
}
if (strcmp(cmdtext, "/pdsfopen", true) == 0){
if (PlayerToPoint(10.0, playerid, -1571.564331, 665.585815, 6.349410))
MoveObject(pdsf_gate, -1571.564331, 665.585815, 6.349410,5);
return 1;
}
if (strcmp(cmdtext, "/pdlvclose", true) == 0){
if (PlayerToPoint(10.0, playerid, 2237.098145, 2449.073242, 9.940882))
MoveObject(pdlv_gate, 2237.098145, 2449.073242, 9.940882,5);
return 1;
}
if (strcmp(cmdtext, "/pdlvopen", true) == 0){
if (PlayerToPoint(10.0, playerid, 2237.098145, 2449.073242, 9.940882))
MoveObject(pdlv_gate, 2237.098145, 2449.073242, 9.940882,5);
return 1;
}
return 0;
}
C:\Dokumente und Einstellungen\Daniel\Desktop\Gates2.pwn(37) : warning 206: redundant test: constant expression is non-zero
C:\Dokumente und Einstellungen\Daniel\Desktop\Gates2.pwn(42) : warning 206: redundant test: constant expression is non-zero
C:\Dokumente und Einstellungen\Daniel\Desktop\Gates2.pwn(47) : warning 206: redundant test: constant expression is non-zero
C:\Dokumente und Einstellungen\Daniel\Desktop\Gates2.pwn(52) : warning 206: redundant test: constant expression is non-zero
C:\Dokumente und Einstellungen\Daniel\Desktop\Gates2.pwn(57) : warning 206: redundant test: constant expression is non-zero
C:\Dokumente und Einstellungen\Daniel\Desktop\Gates2.pwn(62) : warning 206: redundant test: constant expression is non-zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Warnings.
*Hilfe brauch *