Этот раздел, как вы могли заметить по названию, предназначен для решения вопросов по поводу уже существующих модов и плагинов. Пожалуйста, если у вас проблема с написанием плагина, не путайте этот раздел с разделом по скриптингу. Для поиска плагинов и модов существует соответствующий раздел.
Название темы должно соответствовать содержанию. Темы с названием типа "Помогите", "Вопрос", "парни подскажите..." - будут удалены. Все темы, не относящиеся к "Вопросам по модам и плагинам", будут удалены или перемещены в соответствующий раздел.
Правила оформления темы: 1. Помимо заголовка не забудьте верно сформулировать свой вопрос. 2. Выложите исходник (в тег кода + ) или ссылку на плагин который вызывает у вас вопросы. 3. Выложите лог с ошибками (если имеется) под спойлер
Help about fix natives and remove 1UP from Plugin :/
Hello i am using this Coins Plugin. But i have Problem about Natives and the "1UP" should get removed from Plugin and Problems about the Shop System.. This is the code:
new iMaxCoins = get_pcvar_num( gCvarPluginMaxCoinsForLife ); new iGainCoins = get_pcvar_num( gCvarPluginCoinPerBody );
bCountTokenCoins[ id ] += iGainCoins;
if( bCountTokenCoins[ id ] > iMaxCoins ) { // --| Example: // --| If player somehow has 3 coins, and the iGainCoins cvar is set to 2, will receive +2 // --| so, that would be 5. instead of displaying 5/iMaxCoins( which is 4 atm ) will look ugly and unprofessional 5/4 coins. // --| so, just in case that the value is higher, will set it to maximum bCountTokenCoins[ id ] = iMaxCoins;
else if( bCountTokenCoins[ id ] == iMaxCoins ) { ShowSyncHudMsg( id, gHudSyncronizer2, "You have 1 UP [%d/%d Coins]!^nAfter death, you will respawn!", bCountTokenCoins[ id ], iMaxCoins );
public plugin_natives() { register_native("get_user_coins", "get_user_coins", true) register_native("set_user_coins", "set_user_coins", true) }
-->>>
Код
public plugin_natives() { register_native("get_user_coins", "get_user_coins", true) register_native("set_user_coins", "set_user_coins", true) }
but now the CUSTOM SHOP dont work. pls help.
L 04/01/2020 - 09:54:19: [AMXX] Run time error 10 (plugin "cshop_items.amxx") (native "cshop_register_item") - debug not enabled! L 04/01/2020 - 09:54:19: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes). L 04/01/2020 - 09:54:23: Invalid CVAR pointer
L 04/01/2020 - 09:54:19: [AMXX] Plugin "custom_shop.amxx" failed to load: Plugin uses an unknown function (name "set_user_coins") - check your modules.ini.
I am using this Plugin here: and i edited this inc file like Oxicrom said.
cshop_settings.inc:
[code]#if defined _cshop_settings_included #endinput #endif
/* * Change the lines below if you want to use a native for your money currency, e.g. Ammo Packs, BaseBuilder Credits, JBPacks, etc. * Example (%1 = id | %2 = amount): native zp_get_user_ammo_packs(id) native zp_set_user_ammo_packs(id, amount) #define get_user_money(%1) zp_get_user_ammo_packs(%1) #define set_user_money(%1,%2) zp_set_user_ammo_packs(%1, %2) */
new iMaxCoins = get_pcvar_num( gCvarPluginMaxCoinsForLife ); new iGainCoins = get_pcvar_num( gCvarPluginCoinPerBody );
bCountTokenCoins[ id ] += iGainCoins;
if( bCountTokenCoins[ id ] > iMaxCoins ) { // --| Example: // --| If player somehow has 3 coins, and the iGainCoins cvar is set to 2, will receive +2 // --| so, that would be 5. instead of displaying 5/iMaxCoins( which is 4 atm ) will look ugly and unprofessional 5/4 coins. // --| so, just in case that the value is higher, will set it to maximum bCountTokenCoins[ id ] = iMaxCoins;
else if( bCountTokenCoins[ id ] == iMaxCoins ) { ShowSyncHudMsg( id, gHudSyncronizer2, "You have 1 UP [%d/%d Coins]!^nAfter death, you will respawn!", bCountTokenCoins[ id ], iMaxCoins );
/* * Change the lines below if you want to use a native for your money currency, e.g. Ammo Packs, BaseBuilder Credits, JBPacks, etc. * Example (%1 = id | %2 = amount): native zp_get_user_ammo_packs(id) native zp_set_user_ammo_packs(id, amount) #define get_user_money(%1) zp_get_user_ammo_packs(%1) #define set_user_money(%1,%2) zp_set_user_ammo_packs(%1, %2) */