- L 11/15/2021 - 12:13:08: [ReAPI] get_member_s: 'm_iTeam' has no refs to the base class of an entity 'worldspawn'
- L 11/15/2021 - 12:13:08: [AMXX] Run time error 10 (plugin "ze_coins_system.amxx") (native "get_member_s") - debug not enabled!
Version 1.7
- Night Fury
- Mod Developer
- Posts: 677
- Joined: 7 years ago
- Contact:
Version 1.7
Hello there, as you know, we regularly make new version of the mod in order to make it as stable as possible including new features & improvements for any problems that exist.
So in this topic, post whatever new ideas or suggestions to be added or any bugs that currently exist to be fixed in the next version, if you have any. It may happen that there are some ideas that didn't make but we are doing our best to provide as many good ideas as possible.
Please make sure to write as clear as possible so it is easier for us to understand what you mean.
Waiting your awesome ideas .
So in this topic, post whatever new ideas or suggestions to be added or any bugs that currently exist to be fixed in the next version, if you have any. It may happen that there are some ideas that didn't make but we are doing our best to provide as many good ideas as possible.
Please make sure to write as clear as possible so it is easier for us to understand what you mean.
Waiting your awesome ideas .
stop mod at map change all cmds all function will stop at map change and 1 acknowledgement will show "stoping mod changing map" it will prevent load on server while changing map.
-
- Member
- Posts: 24
- Joined: 3 years ago
- Contact:
Adding class-related working code to the main engine.
(the current one does not allow too much)
The best option to turn them off with one cvar (e.g. ze_class 0/1)
I know that you do not like classes, so such a solution would be good - because a few people are counting on them ..: P
One part of the people would be happy if it was possible to enable classes in an engine, and the other would not complain if it was possible to disable it.
(the current one does not allow too much)
The best option to turn them off with one cvar (e.g. ze_class 0/1)
I know that you do not like classes, so such a solution would be good - because a few people are counting on them ..: P
One part of the people would be happy if it was possible to enable classes in an engine, and the other would not complain if it was possible to disable it.
Some Suggestions for Mod ( if any of the suggestion's already Exist Than Don't Mind )
- Add Natives for Changing value of Global Limits of any Particular Item
- Add Zombie idle , Idle Last Sound ( for last zombie )
- Add Cvar to Ze Sounds to stop any particular Sounds
- Add Natives for Geting Zombie Speed ( I Don't know if it exist xD)
- Some Forwards Before and After Extra item Menu Open ( Not Item pre and post selected )
- Some Forwards Before and After Weapon Buy Menu Open
- Some Natives to Release Zombies ( This Can be Some condition in which any event started and the Zombie Are Not released )
- Mode- Choose Zm while Running .... xD
- Some Coustom Weapon Knock Back system ?
if More I Will Let you know
- Add Natives for Changing value of Global Limits of any Particular Item
- Add Zombie idle , Idle Last Sound ( for last zombie )
- Add Cvar to Ze Sounds to stop any particular Sounds
- Add Natives for Geting Zombie Speed ( I Don't know if it exist xD)
- Some Forwards Before and After Extra item Menu Open ( Not Item pre and post selected )
- Some Forwards Before and After Weapon Buy Menu Open
- Some Natives to Release Zombies ( This Can be Some condition in which any event started and the Zombie Are Not released )
- Mode- Choose Zm while Running .... xD
- Some Coustom Weapon Knock Back system ?
if More I Will Let you know
Switch Fake Meta/Ham Sandwich API to ReAPI
Ex:
in reapi
Try delete repeats "rg_round_end" in ze_core, Use it:
ze_message_win (1=Text/2=HUD/3=DHUD)
Ex:
- if (!pev_valid(iEnt)) return;
- if (!is_entity(iEnt)) return;
ze_message_win (1=Text/2=HUD/3=DHUD)
- #include <amxmodx>
- #include <reapi>
- Finish_Round({255, 0, 0}, "ESCAPE_SUCCESS", WINSTATUS_CTS, 3)
- public Finish_Round(iColor[3], const szMessage[], WinStatus:iWin, iPrintType) {
- // Finish a round.
- rg_round_end(5.0, iWin, ROUND_NONE, "");
- // Show HUD
- switch (iPrintType) {
- case 1: engclient_print(0, engprint_center, "%L", LANG_PLAYER, szMessage)
- case 2: {
- set_hudmessage(iColor[0], iColor[1], iColor[2], -1.0, 0.3, 1, 5.0, 5.0, 0.0, 0.0)
- show_hudmessage(0, "%L", LANG_PLAYER, szMessage)
- }
- case 3: {
- set_dhudmessage(iColor[0], iColor[1], iColor[2], -1.0, 0.3, 1, 5.0, 5.0, 0.0, 0.0)
- show_dhudmessage(0, "%L", LANG_PLAYER, szMessage)
- }
- }
- }
Last edited by z0h1r-LK 3 years ago, edited 1 time in total.
z0h1r-LK
Update cvar '"ze_coins_save_type"
0 = nVault
1 = MySQL
2 = No Save
z0h1r-LK
Yes !!!
Add this in zombie_escape.inc
- #define ZE_SETTING_RESOURCES "zombie_escape.ini"
z0h1r-LK
Fix this in ze_resources.amxx
You forgot this
- // Play Ready sound only if game started
- public ze_game_started()
- {
- // Play Ready Sound For All Players
- new szSound[SOUND_MAX_LENGTH]
- ArrayGetString(g_szReadySound, random_num(0, ArraySize(g_szReadySound) - 1), szSound, charsmax(szSound))
- for(new id = 1; id <= g_iMaxPlayers; id++)
- {
- if(!is_user_connected(id) && !g_bReadySound[id])
- continue
- PlaySound(id, szSound)
- }
- }
!g_bReadySound[id]
:
- if(!is_user_connected(id) && !g_bReadySound[id])
z0h1r-LK
try doing one more thing if possible dk what happens but from v1 of this mod when humanized event pops up it consumes cpu power for few sec(depending on how much players u have). if this could get fixed in v1.7 that can increase mod stability for all servers...Night Fury wrote: ↑3 years ago Hello there, as you know, we regularly make new version of the mod in order to make it as stable as possible including new features & improvements for any problems that exist.
So in this topic, post whatever new ideas or suggestions to be added or any bugs that currently exist to be fixed in the next version, if you have any. It may happen that there are some ideas that didn't make but we are doing our best to provide as many good ideas as possible.
Please make sure to write as clear as possible so it is easier for us to understand what you mean.
Waiting your awesome ideas .
We need optimize codes and switch more natives FakeMeta & Ham Sandwich to ReAPI.karan wrote: ↑2 years agotry doing one more thing if possible dk what happens but from v1 of this mod when humanized event pops up it consumes cpu power for few sec(depending on how much players u have). if this could get fixed in v1.7 that can increase mod stability for all servers...Night Fury wrote: ↑3 years ago Hello there, as you know, we regularly make new version of the mod in order to make it as stable as possible including new features & improvements for any problems that exist.
So in this topic, post whatever new ideas or suggestions to be added or any bugs that currently exist to be fixed in the next version, if you have any. It may happen that there are some ideas that didn't make but we are doing our best to provide as many good ideas as possible.
Please make sure to write as clear as possible so it is easier for us to understand what you mean.
Waiting your awesome ideas .
Last edited by z0h1r-LK 2 years ago, edited 1 time in total.
z0h1r-LK
We need fix this error in v1.7:
Reason: When use last version of the ReAPI:
Solution: viewtopic.php?f=22&p=12179#p12179
or
change
Reason: When use last version of the ReAPI:
Solution: viewtopic.php?f=22&p=12179#p12179
or
change
set_member
and get_member
----> set_member_s
and get_member_s
z0h1r-LK
Plugin: ze_core.amxx
Now, It's better:
- public Fw_TraceAttack_Pre(iVictim, iAttacker, Float:flDamage, Float:flDirection[3], iTracehandle, bitsDamageType)
- {
- if (iVictim == iAttacker || !is_user_connected(iVictim) || !is_user_connected(iAttacker))
- return HC_CONTINUE
- // Attacker and Victim is in same teams? Skip code blew
- if (get_member(iAttacker, m_iTeam) == get_member(iVictim, m_iTeam))
- return HC_CONTINUE
- // ...
- public Fw_TraceAttack_Pre(iVictim, iAttacker, Float:flDamage, Float:flDirection[3], iTracehandle, bitsDamageType)
- {
- // Invalid player or Attacker is himself.
- if (iVictim == iAttacker || !is_user_connected(iVictim) || !is_user_connected(iAttacker))
- return HC_CONTINUE;
- // Attacker and Victim is in same teams? Skip code blew
- if (g_bIsZombie[iVictim] || !g_bIsZombie[iAttacker])
- return HC_CONTINUE;
- // ...
- }
z0h1r-LK
I tried optimize this and check from all codes, I haven't tried it:
Updated: 28/03/2022
z0h1r-LK
Add this feature in resource.amxx, to set player model using
ze_set_user_model
- #include <zombie_escape>
- // Defintions.
- #define MAX_MODEL_LENGTH 64
- // Variables.
- new bool:g_bHumanCustomModel[MAX_CLIENTS+1]
- new bool:g_bZombieCustomModel[MAX_CLIENTS+1]
- new g_szHumanCustomModel[MAX_CLIENTS+1][MAX_MODEL_LENGTH]
- new g_szZombieCustomModel[MAX_CLIENTS+1][MAX_MODEL_LENGTH]
- // Forward called after server activation.
- public plugin_init() {
- // Load plugin.
- register_plugin("[ZE] Resource", "0.1", "Escapers-Zone.NET")
- }
- // Forward allows registering natives.
- public plugin_natives() {
- register_native("ze_set_user_model", "_native_set_user_model", 0)
- register_native("ze_reset_user_model", "_native_reset_user_model", 0)
- }
- // Forward called when set player Human (when cure).
- public ze_user_humanized(id) {
- // Human Custom Model is enabled?
- if (g_bHumanCustomModel[id]) {
- // Set player new Human Model.
- rg_set_user_model(id, g_szHumanCustomModel[id])
- }
- }
- // Forward called after infect Human.
- public ze_user_infected(iVictim, iAttacker)
- {
- // Zombie Custom Model is enabled?
- if (g_bZombieCustomModel[id]) {
- // Set player new Zombie Model.
- rg_set_user_model(id, g_szZombieCustomModel[id])
- }
- }
- public _native_set_user_model(id, szModel[], iTeam) {
- // Player not found?
- if (!is_user_connected(id)) {
- log_error(AMX_ERR_NATIVE, "[ZE] Invalid Player (%d)", id)
- return 0; // Return false.
- }
- // Set player Human/Zombie Model.
- switch (iTeam) {
- case ZE_TEAM_HUMAN: {
- g_bHumanCustomModel[id] = true
- copy(g_szHumanCustomModel[id], charsmax(g_szHumanCustomModel[]), szModel)
- } case ZE_TEAM_ZOMBIE: {
- g_bZombieCustomModel[id] = true
- copy(g_szZombieCustomModel[id], charsmax(g_szZombieCustomModel[]), szModel)
- } default: {
- log_error(AMX_ERR_NATIVE, "[ZE] Invalid Team (%d)", iTeam)
- return 0; // Return false.
- }
- }
- // Return true.
- return 1;
- }
- public _native_reset_user_model(id, iTeam) {
- // Player not found?
- if (!is_user_connected(id)) {
- log_error(AMX_ERR_NATIVE, "[ZE] Invalid Player (%d)", id)
- return 0; // Return false.
- }
- // Set player Human/Zombie Model.
- switch (iTeam) {
- case ZE_TEAM_HUMAN: {
- g_bHumanCustomModel[id] = false
- g_szHumanCustomModel[id] = '^0'
- } case ZE_TEAM_ZOMBIE: {
- g_bZombieCustomModel[id] = false
- g_szZombieCustomModel[id] = '^0'
- } default: {
- log_error(AMX_ERR_NATIVE, "[ZE] Invalid Team (%d)", iTeam)
- return 0; // Return false.
- }
- }
- // Return true.
- return 1;
- }
Last edited by z0h1r-LK 2 years ago, edited 1 time in total.
z0h1r-LK
Add new native
Do this in ze_core
ze_infection_status(bool:bStatus)
to enable or disabled infection.Do this in ze_core
- #include <zombie_escape>
- // Variables.
- new bool:g_bStatusInfection
- // Hook Chains Variable.
- new HookChain:g_hcTraceAttack
- // Forward allows registering natives.
- public plugin_natives() {
- register_native("ze_infection_status", "_native_infection_status", 1)
- }
- // Forward called after server activation.
- public plugin_init() {
- // ...
- // Hook Chains.
- g_hcTraceAttack = RegisterHookChain(RG_CBasePlayer_TraceAttack, "Fw_TraceAttack_Pre", 0)
- // Static Values.
- g_bStatusInfection = true
- }
- public _native_infection_status(bool:bStatus) {
- if (!bStatus) {
- g_bStatusInfection = false
- DisableHookChain(g_hcTraceAttack)
- } else {
- g_bStatusInfection = true
- EnableHookChain(g_hcTraceAttack)
- }
- }
z0h1r-LK
I see this is better method to chosen player in previous round.
Change this:
By this:
No need to check, If smart random is Enabled, can Owner enable it in any time, and change dyanmic array to Triepublic
This better:
Change this:
- // Dynamic Arrays
- new Array:g_aChosenPlayers
- // Trie Variables.
- new Trie:g_tChosenPlayers
- public DelaySmartRandom() {
- // Create our Trie to store SteamIDs in
- g_tChosenPlayers = TrieCreate()
- }
- Choose_Zombies() {
- new szAuthID[35], iAliveCount, iReqZombies, iZombies, id
- // Get total alive players and required players
- iAliveCount = GetAllAlivePlayersNum()
- iReqZombies = RequiredZombies()
- // Get integer value from cvar.
- new iSmartRandom = get_pcvar_num(g_pCvarSmartRandom)
- // Get float value (first zombie health) from cvar
- new Float:flFirstZombieHealth = get_pcvar_float(g_pCvarFirstZombiesHealth)
- // Loop till we find requires players
- while (iZombies < iReqZombies) {
- // Get random player index.
- id = GetRandomAlive(random_num(1, iAliveCount))
- // Get auth (SteamID) of player.
- get_user_authid(id, szAuthID, charsmax(szAuthID))
- // Player is died or is already Zombie?
- if (!is_user_alive(id) || g_bIsZombie[id])
- continue;
- // Check if CVAR enabled and if player in the Trie, it means he chosen previous round so skip him this round
- if (iSmartRandom && TrieKeyExists(g_tChosenPlayers, szAuthID))
- continue;
- // Infect player.
- Set_User_Zombie(id)
- // Set zombie health.
- set_entvar(id, var_health, flFirstZombieHealth)
- // Set zombie frozen flag.
- g_bIsZombieFrozen[id] = true
- set_entvar(id, var_maxspeed, 1.0)
- // New Zombie
- iZombies++
- }
- if (iZombies > 0) {
- g_bZombieFreezeTime = true
- set_task(0.1, "Zombies_Speed", ZOMBIES_SPEED, _, _, "b") // Better than PreThink
- ExecuteForward(g_iForwards[FORWARD_ZOMBIE_APPEAR], g_iFwReturn)
- }
- // Check from Smart Random is enable?
- if (iSmartRandom) {
- // Clear the Trie first
- TrieClear(g_tChosenPlayers)
- new szAuthID[35], id
- // Add steamid of chosen zombies, so we don't choose them next round again (using steamid means it support reconnect)
- for (id = 1; id <= g_iMaxClients; id++) {
- // Player not found or is a Zombie?
- if(!is_user_connected(id) || !g_bIsZombie[id])
- continue
- // Get authid (SteamID) of player.
- get_user_authid(id, szAuthID, charsmax(szAuthID))
- // Stors SteamIDs of chosen players in Trie.
- TrieSetCell(g_tChosenPlayers, szAuthID, 0)
- }
- }
- // 2 is Hardcoded Value, It's Fix for the countdown to work correctly
- g_iCountDown = get_pcvar_num(g_pCvarZombieReleaseTime) - 2
- // Show release time.
- set_task(1.0, "ReleaseZombie_CountDown", TASK_COUNTDOWN2, _, _, "b")
- }
z0h1r-LK
in cs_weap_models_api
change this:
to this:
change this:
- // cstrike
- cs_get_weapon_id(entity_id)
- #define EXTRAOFFSET_WEAPONS 4
- #define OFFSET_WEAPONTYPE 43
- // fakemeta.
- get_pdata_int(entity_id, OFFSET_WEAPONTYPE, EXTRAOFFSET_WEAPONS)
z0h1r-LK
Who is online
Users browsing this forum: No registered users and 1 guest