05.03.2010, 19:41
hi,i have this code:
and my error is
some help?
Код:
#include <a_samp> #define FILTERSCRIPT #define MAX_STREAMED_OBJECTS 5000 new ObjectModel[MAX_STREAMED_OBJECTS]; new Float:ObjectPos[MAX_STREAMED_OBJECTS][3]; new Float:ObjectRotation[MAX_STREAMED_OBJECTS][3]; new Float:ObjectDistance[MAX_STREAMED_OBJECTS]; new ObjectIDS[MAX_PLAYERS][MAX_STREAMED_OBJECTS]; new ObjectStreamed[MAX_PLAYERS][MAX_STREAMED_OBJECTS]; new ObjectID = -1; new ObjectUsed[MAX_STREAMED_OBJECTS]; SetTimer("Stream", 400, true); stock CreateObjectEx(ModelID, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:Dist = 100.0) { ObjectID++; //id obiect ObjectModel[ObjectID] = ModelID; ObjectPos[ObjectID][0] = X; ObjectPos[ObjectID][1] = Y; ObjectPos[ObjectID][2] = Z; ObjectRotation[ObjectID][0] = rX; ObjectRotation[ObjectID][1] = rY; ObjectRotation[ObjectID][2] = rZ; ObjectDistance[ObjectID] = Dist; ObjectUsed[ObjectID] = 1; } forward Stream(); public Stream() { for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { for(new S; S<ObjectID+1; S++) { if(ObjectUsed[S] == 1) { if(IsPlayerInRangeOfPoint(i, ObjectDistance[S], ObjectPos[S][0], ObjectPos[S][1], ObjectPos[S][2]) && ObjectStreamed[i][S] == 0) { ObjectIDS[i][S] = CreatePlayerObject(i, ObjectModel[S], ObjectPos[S][0], ObjectPos[S][1], ObjectPos[S][2], ObjectRotation[S][0], ObjectRotation[S][1], ObjectRotation[S][2]);//Create the object ObjectStreamed[i][S] = 1; continue; } } if(!IsPlayerInRangeOfPoint(i, ObjectDistance[S], ObjectPos[S][0], ObjectPos[S][1], ObjectPos[S][2]) && ObjectStreamed[i][S] == 1) { ObjectStreamed[i][S] = 0; DestroyPlayerObject(i, ObjectIDS[i][S]); continue; } } } } return 1; } stock DestroyObjectEx(ObjectId) { ObjectUsed[ObjectId] = 0; for(new i; i<MAX_PLAYERS; i++) { if(ObjectStreamed[i][ObjectId] == 1) { ObjectStreamed[i][ObjectId] = 0; DestroyPlayerObject(i, ObjectIDS[i][ObjectId]); } } } stock SetObjectDistance(ObjectId, Float:Dist) { ObjectDistance[ObjectId] = Dist; }
Код:
D:Documents and SettingsadyDesktopGTARPfilterscripts222.pwn(12) : error 021: symbol already defined: "SetTimer" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.