Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void LoadActors()
- {
- int time = GetTickCount();
- if(!cache_num_rows()) return true;
- for(int i = 0; i < cache_num_rows(); i++)
- {
- cache_get_value_index_int(i, 0, ActorsInfo[i][aID]);
- cache_get_value_index_int(i, 1, ActorsInfo[i][aSkin]);
- cache_get_value_index_float(i, 2, ActorsInfo[i][aCord][0]);
- cache_get_value_index_float(i, 3, ActorsInfo[i][aCord][1]);
- cache_get_value_index_float(i, 4, ActorsInfo[i][aCord][2]);
- cache_get_value_index_float(i, 5, ActorsInfo[i][aCord][3]);
- cache_get_value_index(i, 6, ActorsInfo[i][aBible], 15);
- cache_get_value_index(i, 7, ActorsInfo[i][aAnim], 32);
- cache_get_value_index(i, 8, ActorsInfo[i][aName], 32);
- cache_get_value_index_int(i, 9, ActorsInfo[i][aType]);
- ActorsInfo[i][aID] = CreateActor(ActorsInfo[i][aSkin], ActorsInfo[i][aCord][0], ActorsInfo[i][aCord][1], ActorsInfo[i][aCord][2], ActorsInfo[i][aCord][3]);
- ApplyActorAnimation(ActorsInfo[i][aID], ActorsInfo[i][aBible], ActorsInfo[i][aAnim], 4.1,1,1,1,1,1);
- SetActorInvulnerable(ActorsInfo[i][aID], 1);
- new string[70];
- if(ActorsInfo[i][aType] == 0) format(string, 70, "NPC: {"#WHITE"}%s", ActorsInfo[i][aName]);
- else format(string, 70, "NPC: {"#WHITE"}%s\n\nВзаимодействие {"#YL"}H", ActorsInfo[i][aName]);
- LABELACTORS[i] = CreateDynamic3DTextLabel(string, c_YELLOW, ActorsInfo[i][aCord][0], ActorsInfo[i][aCord][1], ActorsInfo[i][aCord][2]+1.1,5.0);
- TOTALACTORS++;
- }
- printf("[Load Actors]: loading %i bad %i (ms)", TOTALACTORS, GetTickCount() - time);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement