Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. UnionDeleteContract(id_contr, union_win = -1)
  2. {
  3. for(new i; i < MAX_UNION_CONTRACTS; i++)
  4. {
  5. if(cUnion_Data[i][cuID] == id_contr)
  6. {
  7. for(new idx_union = union_count; idx_union != -1; idx_union--)
  8. {
  9. if(idx_union == union_win && union_win != -1)
  10. {
  11. union_info[i][union_contract_progress][i] = 0;
  12. continue;
  13. }
  14. if(union_info[idx_union][union_contract_progress][i] > 0 && union_win != -1)
  15. {
  16. STRING_GLOBAL[0] = EOS;
  17. f(STRING_GLOBAL, "[%s] Ваше объедение не выполнило контракт '%s'. Победители: '%s'.", union_info[idx_union][union_name],
  18. cUnion_Init[id_contr][cuName], union_info[union_win][union_name]);
  19. union_message(idx_union, union_chat_colors[union_info[idx_union][union_chat_color]], STRING_GLOBAL);
  20. }
  21. if(union_info[idx_union][union_contract_progress][i] > 0 && cUnion_Data[i][cuTime] <= 0)
  22. {
  23. STRING_GLOBAL[0] = EOS;
  24. f(STRING_GLOBAL, "[%s] Ваше объедение не выполнило контракт '%s'. Причина: Время закончилось.",
  25. union_info[idx_union][union_name], cUnion_Init[id_contr][cuName]);
  26. union_message(idx_union, union_chat_colors[union_info[idx_union][union_chat_color]], STRING_GLOBAL);
  27. }
  28. union_info[i][union_contract_progress][i] = 0;
  29. }
  30.  
  31. cUnion_Data[i][cuID] = CU_ID_NONE;
  32. cUnion_Data[i][cuTime] = RandomEx(15, 30);
  33.  
  34. STRING_GLOBAL[0] = EOS;
  35. mysql_format(con_bd, STRING_GLOBAL, 128, "UPDATE `unionies` SET `contract_progress_%d` = 0 WHERE 1;", i);
  36. mysql_tquery (con_bd, STRING_GLOBAL, "", "");
  37. break;
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement