AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [Req] zombie escape runners plugin (https://forums.alliedmods.net/showthread.php?t=327412)

nacho312 09-17-2020 09:03

[Req] zombie escape runners plugin
 
Gm,

I'm looking for the plugin that shows top 3 runners (hud), well I dont think I need to explain it, because the picture below does, If you've ever played on a zombie escape server, you'll know what I'm talking about. (It's a zombie escape plugin)

https://i.postimg.cc/1fZZ7kXD/20200916-012542.png

I tried to seach, but unfortunately haven't found it.

Thanks in advance.

Supremache 09-17-2020 09:26

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by nacho312 (Post 2718021)
Gm,

I'm looking for the plugin that shows top 3 runners (hud), well I dont think I need to explain it, because the picture below does, If you've ever played on a zombie escape server, you'll know what I'm talking about. (It's a zombie escape plugin)

https://i.postimg.cc/1fZZ7kXD/20200916-012542.png

I tried to seach, but unfortunately haven't found it.

Thanks in advance.

Get this plugin from this mod:
https://gamebanana.com/gamefiles/3544

nacho312 09-17-2020 09:46

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by Supremache (Post 2718025)
Get this plugin from this mod:
https://gamebanana.com/gamefiles/3544

I have downloaded the mod, but haven't found any plugins on it, lol.

Supremache 09-17-2020 11:21

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by nacho312 (Post 2718027)
I have downloaded the mod, but haven't found any plugins on it, lol.

I think codes have compliered with ze.sma

nacho312 09-17-2020 11:31

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by Supremache (Post 2718030)
I think codes have compliered with ze.sma

Thats what I tought, but there's no zombie escape.sma, even the compiled plugin is not there, the only thing I found is the include file "zombie escape.inc".

Supremache 09-17-2020 11:36

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by nacho312 (Post 2718032)
Thats what I tought, but there's no zombie escape.sma, even the compiled plugin is not there, the only thing I found is the include file "zombie escape.inc".

Let me try to make this plugin

nacho312 09-17-2020 11:40

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by Supremache (Post 2718033)
Let me try to make this plugin

Oh, It would be very good, but isn't it hard to make?

Supremache 09-17-2020 12:21

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by nacho312 (Post 2718034)
Oh, It would be very good, but isn't it hard to make?

I found it:

Code:
#include amxmodx #include fakemeta #include zombieplague #define TASKID_UPDATESTATS  308191643 enum _: e_EscapePos {     RANK_NONE = 0,     RANK_FIRST,     RANK_SECOND,     RANK_THIRD }; new g_iEscapePoint[33],     g_iEscapePos[e_EscapePos]; public plugin_init() {     register_plugin("[ZE] Addon: XMAS 2040 LEADER", "0.1 | 30.08.2019", "Reega!");     register_dictionary("zombie_plague.txt")     register_logevent("StartRound", 2, "1=Round_Start"); } public zp_round_ended() if(task_exists(TASKID_UPDATESTATS)) remove_task(TASKID_UPDATESTATS); public StartRound() set_task(0.1, "CTaskiPlayer__UpdateStats", TASKID_UPDATESTATS, _, _, "b"); public CTaskiPlayer__UpdateStats() {     static Float: vecVelocity[3], iSpeed;     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;                     pev(iPlayer, pev_velocity, vecVelocity)         iSpeed = floatround(vector_length(vecVelocity));                     switch(iSpeed) {             case 210..229: g_iEscapePoint[iPlayer] += 1;             case 230..249: g_iEscapePoint[iPlayer] += 2;             case 250..300: g_iEscapePoint[iPlayer] += 3;         }         show_stat(iPlayer);     } } public show_stat(iPlayer) {     get_stat()     new temp_string_first[64], temp_string_second[64], temp_string_third[64], curiPlayer, Player_Name[64], none[32]         formatex(none, sizeof(none), "%L", LANG_PLAYER, "RANK_NONE")         // Rank First     curiPlayer = g_iEscapePos[RANK_FIRST]     if(is_user_alive(curiPlayer) && g_iEscapePoint[curiPlayer] != 0)     {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_first, sizeof(temp_string_first), "%L", LANG_PLAYER, "RANK_FIRST", Player_Name)     } else {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_first, sizeof(temp_string_first), "%L", LANG_PLAYER, "RANK_FIRST", none)        }         // Rank Second     curiPlayer = g_iEscapePos[RANK_SECOND]     if(is_user_alive(curiPlayer) && g_iEscapePoint[curiPlayer] != 0)     {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_second, sizeof(temp_string_second), "%L", LANG_PLAYER, "RANK_SECOND", Player_Name)     } else {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_second, sizeof(temp_string_second), "%L", LANG_PLAYER, "RANK_SECOND", none)        }         // Rank Third     curiPlayer = g_iEscapePos[RANK_THIRD]     if(is_user_alive(curiPlayer) && g_iEscapePoint[curiPlayer] != 0)     {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_third, sizeof(temp_string_third), "%L", LANG_PLAYER, "RANK_THIRD", Player_Name)     } else {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_third, sizeof(temp_string_third), "%L", LANG_PLAYER, "RANK_THIRD", none)        }     static Float: vecVelocity[3], Float: flSpeed; pev(iPlayer, pev_velocity, vecVelocity);     flSpeed = floatsqroot(floatpower(vecVelocity[0], 2.0) + floatpower(vecVelocity[1], 2.0));     set_hudmessage(255, 0, 255, 0.02, 0.2, 0, 2.0, 0.001);     show_hudmessage(iPlayer, "%L^n%s^n%s^n%s^n[%3.2f] - Speed", LANG_PLAYER, "RANK_INFO", temp_string_first, temp_string_second, temp_string_third, flSpeed)    } public get_stat() {     static highest, current;     highest = current = 0;         // Rank First     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;         if(g_iEscapePoint[iPlayer] > highest) {             current = iPlayer;             highest = g_iEscapePoint[iPlayer];         }     }     g_iEscapePos[RANK_FIRST] = current;         // Rank Second     highest = current = 0;     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;         if(g_iEscapePos[RANK_FIRST] == iPlayer) continue;                     if(g_iEscapePoint[iPlayer] > highest) {             current = iPlayer;             highest = g_iEscapePoint[iPlayer];         }     }     g_iEscapePos[RANK_SECOND] = current;         // Rank Third     highest = current = 0;     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;         if(g_iEscapePos[RANK_FIRST] == iPlayer || g_iEscapePos[RANK_SECOND] == iPlayer) continue;                     if(g_iEscapePoint[iPlayer] > highest) {             current = iPlayer;             highest = g_iEscapePoint[iPlayer];         }     }     g_iEscapePos[RANK_THIRD] = current; }

nacho312 09-17-2020 14:18

Re: [Req] zombie escape runners plugin
 
Quote:

Originally Posted by Supremache (Post 2718036)
I found it:

Code:
#include amxmodx #include fakemeta #include zombieplague #define TASKID_UPDATESTATS  308191643 enum _: e_EscapePos {     RANK_NONE = 0,     RANK_FIRST,     RANK_SECOND,     RANK_THIRD }; new g_iEscapePoint[33],     g_iEscapePos[e_EscapePos]; public plugin_init() {     register_plugin("[ZE] Addon: XMAS 2040 LEADER", "0.1 | 30.08.2019", "Reega!");     register_dictionary("zombie_plague.txt")     register_logevent("StartRound", 2, "1=Round_Start"); } public zp_round_ended() if(task_exists(TASKID_UPDATESTATS)) remove_task(TASKID_UPDATESTATS); public StartRound() set_task(0.1, "CTaskiPlayer__UpdateStats", TASKID_UPDATESTATS, _, _, "b"); public CTaskiPlayer__UpdateStats() {     static Float: vecVelocity[3], iSpeed;     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;                     pev(iPlayer, pev_velocity, vecVelocity)         iSpeed = floatround(vector_length(vecVelocity));                     switch(iSpeed) {             case 210..229: g_iEscapePoint[iPlayer] += 1;             case 230..249: g_iEscapePoint[iPlayer] += 2;             case 250..300: g_iEscapePoint[iPlayer] += 3;         }         show_stat(iPlayer);     } } public show_stat(iPlayer) {     get_stat()     new temp_string_first[64], temp_string_second[64], temp_string_third[64], curiPlayer, Player_Name[64], none[32]         formatex(none, sizeof(none), "%L", LANG_PLAYER, "RANK_NONE")         // Rank First     curiPlayer = g_iEscapePos[RANK_FIRST]     if(is_user_alive(curiPlayer) && g_iEscapePoint[curiPlayer] != 0)     {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_first, sizeof(temp_string_first), "%L", LANG_PLAYER, "RANK_FIRST", Player_Name)     } else {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_first, sizeof(temp_string_first), "%L", LANG_PLAYER, "RANK_FIRST", none)        }         // Rank Second     curiPlayer = g_iEscapePos[RANK_SECOND]     if(is_user_alive(curiPlayer) && g_iEscapePoint[curiPlayer] != 0)     {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_second, sizeof(temp_string_second), "%L", LANG_PLAYER, "RANK_SECOND", Player_Name)     } else {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_second, sizeof(temp_string_second), "%L", LANG_PLAYER, "RANK_SECOND", none)        }         // Rank Third     curiPlayer = g_iEscapePos[RANK_THIRD]     if(is_user_alive(curiPlayer) && g_iEscapePoint[curiPlayer] != 0)     {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_third, sizeof(temp_string_third), "%L", LANG_PLAYER, "RANK_THIRD", Player_Name)     } else {         get_user_name(curiPlayer, Player_Name, sizeof(Player_Name))         formatex(temp_string_third, sizeof(temp_string_third), "%L", LANG_PLAYER, "RANK_THIRD", none)        }     static Float: vecVelocity[3], Float: flSpeed; pev(iPlayer, pev_velocity, vecVelocity);     flSpeed = floatsqroot(floatpower(vecVelocity[0], 2.0) + floatpower(vecVelocity[1], 2.0));     set_hudmessage(255, 0, 255, 0.02, 0.2, 0, 2.0, 0.001);     show_hudmessage(iPlayer, "%L^n%s^n%s^n%s^n[%3.2f] - Speed", LANG_PLAYER, "RANK_INFO", temp_string_first, temp_string_second, temp_string_third, flSpeed)    } public get_stat() {     static highest, current;     highest = current = 0;         // Rank First     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;         if(g_iEscapePoint[iPlayer] > highest) {             current = iPlayer;             highest = g_iEscapePoint[iPlayer];         }     }     g_iEscapePos[RANK_FIRST] = current;         // Rank Second     highest = current = 0;     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;         if(g_iEscapePos[RANK_FIRST] == iPlayer) continue;                     if(g_iEscapePoint[iPlayer] > highest) {             current = iPlayer;             highest = g_iEscapePoint[iPlayer];         }     }     g_iEscapePos[RANK_SECOND] = current;         // Rank Third     highest = current = 0;     for(new iPlayer = 1; iPlayer <= get_maxplayers(); iPlayer++) {         if(!is_user_alive(iPlayer)) continue;         if(g_iEscapePos[RANK_FIRST] == iPlayer || g_iEscapePos[RANK_SECOND] == iPlayer) continue;                     if(g_iEscapePoint[iPlayer] > highest) {             current = iPlayer;             highest = g_iEscapePoint[iPlayer];         }     }     g_iEscapePos[RANK_THIRD] = current; }

Huge thanks!


All times are GMT -4. The time now is 20:46.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.