Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public NativeRegisterType(plugin, params) {
- enum {
- arg_name = 1,
- arg_desc
- };
- new punish_name[32], punish_desc[32];
- new punish_index, ret;
- get_string(arg_name, punish_name, charsmax(punish_name));
- get_string(arg_desc, punish_desc, charsmax(punish_desc));
- for(new i; i < ArraySize(g_JsonData); i++) {
- arrayset(g_ParsingInfo, 0, sizeof g_ParsingInfo);
- ArrayGetArray(g_JsonData, i, g_ParsingInfo);
- punish_index = ++g_PunishNums;
- // проверка локального кэша системы на предмет присутствия типа наказания
- if(equal(g_ParsingInfo[Name], punish_name)) {
- log_amx("Тип наказаний есть в кэше, вызываем форвард FW_REGISTERED_TYPE");
- ExecuteForward(g_Forwards[FW_REGISTERED_TYPE], ret, punish_index, punish_name);
- break;
- } else {
- // отправить реквест на создание и после удачного запроса вызвать форвард
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement