AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Force round end idea(s) (https://forums.alliedmods.net/showthread.php?t=83738)

hleV 01-14-2009 12:33

Force round end idea(s)
 
AFAIK there's still no good plugin for forcing the round to end.

What if we would tranfer players for example from T team to CT, while T team has at least one dead player? After that we could transfer those players back. It should be instant, so players shouldn't even notice that. Only the server would notice that all T players had left T team and the CT team would be announced as the winner.

Code:
#include <amxmodx> #include <amxmisc>   public plugin_init()         register_concmd("amx_teamwin", "cTeamWin", ADMIN_BAN, "<ct|t> - end round by win of a specifig team");   public cTeamWin(iCl, iLevel, iCmd) {         if (!cmd_access(iCl, iLevel, iCmd, 2))         {                 console_print(iCl, "You have no access to that command");                   return PLUGIN_HANDLED;         }           new szArg[2];         read_argv(1, szArg, 1);           switch (szArg)         {                 case 'c': sTransfer(1); // Transfer Ts                 case 't': sTransfer(2); // Transfer CTs                   default: console_print(iCl, "Usage: amx_teamwin <ct|t>");         }           return PLUGIN_HANDLED; }   stock sTransfer(iTeam) {         // Transfer code }

AoD90 01-14-2009 13:25

Re: Force round end idea(s)
 
Code:

    new num, players[32]
    get_players(players, num, "h")
    for (new i = 0; i <= num; i++)
    {
    if (!is_user_connected(players[i]))
        continue

    if (cs_get_user_team(players[i]) == CS_TEAM_UNASSIGNED || cs_get_user_team(players[i]) == CS_TEAM_SPECTATOR)
        continue

    if (cs_get_user_team(players[i]) == CS_TEAM_T)
        cs_set_user_team(players[i], CS_TEAM_CT)

    else
        cs_set_user_team(players[i], CS_TEAM_T)

    }

This is simle switch. Maby it could help :)

Dores 01-14-2009 14:15

Re: Force round end idea(s)
 
Just restart the round and show on scoreboard each player's frags and deaths by using the pev_frags and pev_deaths fields(not sure what to do about the teams winnings and loses though...:|).

anakin_cstrike 01-17-2009 04:52

Re: Force round end idea(s)
 
PHP Code:

switch (szArg

->
PHP Code:

switch (szArg[0]) 



All times are GMT -4. The time now is 01:50.

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