26.11.2010, 14:18
I have looked at wiki but... -.-
ERROR
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
forward CheckGate();
new mygate;
public OnFilterScriptInit()
{
SetTimer("CheckGate",1000,true);
mygate = CreateObject(16773, 996.85345459, 2133.22070312, 12.84457397, 0, 0, 90);
return 1;
}
public CheckGate()
{
new mygate_status;
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
if(IsPlayerInRangeOfPoint(i,10.0,996.85345459,2133.22070312,12.84457397))mygate_status=1;
}
if(c_gate_status)MoveObject(mygate, 996.85345458984,2133.220703125,5.8, 2.00);
else MoveObject(mygate, 996.85345459,2133.22070312,12.84457397, 2.00);
}
stock IsPlayerInRangeOfPoint(playerid, Float:radius, Float:X, Float:Y, Float:Z)
{
new Float:px,Float:py,Float:pz;
GetPlayerPos(playerid,px,py,pz);
return ( ( ((px-X)*(px-X))+((py-Y)*(py-Y))+((pz-Z)*(pz-Z)) ) >= radius*radius );
}
pawn Код:
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\AdminHQ.pwn(25) : error 017: undefined symbol "c_gate_status"
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\AdminHQ.pwn(23) : warning 204: symbol is assigned a value that is never used: "mygate_status"
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\AdminHQ.pwn(23 -- 29) : error 021: symbol already defined: "IsPlayerInRangeOfPoint"
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\AdminHQ.pwn(23 -- 32) : error 021: symbol already defined: "GetPlayerPos"
C:\Users\Larsey123\Documents\SAMP Server\My server\filterscripts\AdminHQ.pwn(23 -- 32) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.