Alright well I managed to make one myself, but I keep getting 2 errors. Decided to use IsPlayerInRangeOfPoint.
Код:
forward target1check();
Код:
SetTimer("target1check",3000,true);
Код:
public target1check()
{
new target1_status;
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i,10.0, 1553.8453,-1019.7006,23.9063))target1_status = 1;
}
if(target1_status)MoveObject(target1check, 1549.7900390625, -1006.2829589844, 24.124252319336, 2.00);
else MoveObject(target1check, 1555.9527587891, -1013.5319824219, 24.828693389893, 2.00);
}
and I get these two errors,
Код:
C:\Users\Chrispy\Documents\SA-MP Server\gamemodes\practicescript.pwn(90) : error 076: syntax error in the expression, or invalid function call
C:\Users\Chrispy\Documents\SA-MP Server\gamemodes\practicescript.pwn(91) : error 076: syntax error in the expression, or invalid function call
Lines 90 & 91 are,
Код:
if(target1_status)MoveObject(target1check, 1549.7900390625, -1006.2829589844, 24.124252319336, 2.00);
else MoveObject(target1check, 1555.9527587891, -1013.5319824219, 24.828693389893, 2.00);