29.04.2015, 15:33
Vocк criou o comando dentro de uma array e por isso bugou tudo.....
corrigindo:
E o comando tem que estar dentro da OnPlayerCommandText.
corrigindo:
Код:
{ ModelID, ObjectID[MAX_PLAYERS], Float:ox, Float:oy, Float:oz, Float:orx, Float:ory, Float:orz, Float:ovdist, bool:ObjectCreated[MAX_PLAYERS], } new ObjectInfo[Ilde_MAX_OBJECTS][OInfo]; new bool:ObjectUpdatetRunning; new bool:CantCreateMore; new bool:RefreshObjects[MAX_PLAYERS]; new Float:OldX[MAX_PLAYERS], Float:OldY[MAX_PLAYERS], Float:OldZ[MAX_PLAYERS]; forward Ilde_ObjectUpdate(bool:DontCheckDistance); forward Ilde_StartUpdate(); public Ilde_StartUpdate() { SetTimer("Ilde_ObjectUpdate", UpdateTime, 1); } stock Ilde_CreateObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:vdist=0.0) { if(ObjectUpdatetRunning == false) { SetTimer("Ilde_StartUpdate", Ilde_MAX_OBJECTS/2, 0); ObjectUpdatetRunning = true; } new objectid; if(CantCreateMore == false) { for(new i; i<Ilde_MAX_OBJECTS; i++) { if(i == Ilde_MAX_OBJECTS-1) { printf("Only the first %i objects could be created - object limit exceeded.", Ilde_MAX_OBJECTS); CantCreateMore = true; } if(ObjectInfo[i][ModelID] == 0) { objectid = i; break; } } } else { return -1; } if(modelid == 0) { printf("Invalid modelid for object %i", objectid); return -1; } ObjectInfo[objectid][ModelID] = modelid; ObjectInfo[objectid][ox] = x; ObjectInfo[objectid][oy] = y; ObjectInfo[objectid][oz] = z; ObjectInfo[objectid][orx] = rx; ObjectInfo[objectid][ory] = ry; ObjectInfo[objectid][orz] = rz; ObjectInfo[objectid][ovdist] = vdist; return objectid; } stock Ilde_IsValidObject(objectid) { if(ObjectInfo[objectid][ModelID] == 0 || objectid == -1) { return 0; } return 1; }