Advertisement
Sem_Loreann

Untitled

Mar 18th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. void LoadActors()
  2. {
  3. int time = GetTickCount();
  4. if(!cache_num_rows()) return true;
  5. for(int i = 0; i < cache_num_rows(); i++)
  6. {
  7. cache_get_value_index_int(i, 0, ActorsInfo[i][aID]);
  8. cache_get_value_index_int(i, 1, ActorsInfo[i][aSkin]);
  9. cache_get_value_index_float(i, 2, ActorsInfo[i][aCord][0]);
  10. cache_get_value_index_float(i, 3, ActorsInfo[i][aCord][1]);
  11. cache_get_value_index_float(i, 4, ActorsInfo[i][aCord][2]);
  12. cache_get_value_index_float(i, 5, ActorsInfo[i][aCord][3]);
  13. cache_get_value_index(i, 6, ActorsInfo[i][aBible], 15);
  14. cache_get_value_index(i, 7, ActorsInfo[i][aAnim], 32);
  15. cache_get_value_index(i, 8, ActorsInfo[i][aName], 32);
  16. cache_get_value_index_int(i, 9, ActorsInfo[i][aType]);
  17.  
  18. ActorsInfo[i][aID] = CreateActor(ActorsInfo[i][aSkin], ActorsInfo[i][aCord][0], ActorsInfo[i][aCord][1], ActorsInfo[i][aCord][2], ActorsInfo[i][aCord][3]);
  19. ApplyActorAnimation(ActorsInfo[i][aID], ActorsInfo[i][aBible], ActorsInfo[i][aAnim], 4.1,1,1,1,1,1);
  20. SetActorInvulnerable(ActorsInfo[i][aID], 1);
  21.  
  22. new string[70];
  23. if(ActorsInfo[i][aType] == 0) format(string, 70, "NPC: {"#WHITE"}%s", ActorsInfo[i][aName]);
  24. else format(string, 70, "NPC: {"#WHITE"}%s\n\nВзаимодействие {"#YL"}H", ActorsInfo[i][aName]);
  25. LABELACTORS[i] = CreateDynamic3DTextLabel(string, c_YELLOW, ActorsInfo[i][aCord][0], ActorsInfo[i][aCord][1], ActorsInfo[i][aCord][2]+1.1,5.0);
  26. TOTALACTORS++;
  27. }
  28. printf("[Load Actors]: loading %i bad %i (ms)", TOTALACTORS, GetTickCount() - time);
  29. return true;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement