Half-Life Icon HL Script

[AMXX][ALL] Weird Round

Yo, buddy. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Rj. points.
  • Post: Give Rj. your thoughts on this Script.
  • Vote: Help Rj. win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Join the community!

Sign up

Already a Bananite? Login

131 lines | 3 kb | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "Weird Round"
#define VERSION "1.1"
#define AUTHOR "BreaKer"

new pCvarGrav
new pCvarSpeed
new pCvarFrags
new pCvarDeaths
new pCvarArmor
new pCvarHealth
new pCvarStatus
new pCvarHGrav

public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        pCvarStatus = register_cvar( "wr_status", "1" )
        pCvarGrav = register_cvar( "wr_gravity", "0.6" )
        pCvarSpeed = register_cvar( "wr_speed", "320" )
        pCvarFrags = register_cvar( "wr_frags", "0" )
        pCvarDeaths = register_cvar( "wr_deaths", "0" )
        pCvarArmor = register_cvar( "wr_armor", "200" )
        pCvarHealth = register_cvar( "wr_hp", "500" )
        pCvarHGrav = register_cvar( "wr_hgrav", "9" )
        RegisterHam(Ham_Spawn, "player", "fwdHamSpawn")
}
public fwdHamSpawn(id) {
        set_task(2.0, "selectPower", id + 1337)
        return HAM_IGNORED
}

public selectPower(task) {
               
        new gravity = get_pcvar_num(pCvarGrav)
        new speed = get_pcvar_num(pCvarSpeed)
        new frags = get_pcvar_num(pCvarFrags)
        new health = get_pcvar_num(pCvarHealth)
        new armor = get_pcvar_num(pCvarArmor)
        new deaths = get_pcvar_num(pCvarDeaths)
        new hgrav = get_pcvar_num(pCvarHGrav)
        new id = task - 1337
       
        if(get_pcvar_num(pCvarStatus) == 1) {
                new iRandomNum = random_num(0, 7)
                new szPlayers[32], iCount, index      
                get_players(szPlayers, iCount, "a")
               
                for(new i=0; i < iCount; i++)
                {
                        index = szPlayers[i]
                       
                        switch(iRandomNum) {
                                case 0: {
                                        set_user_gravity(index, float(gravity))
                                        client_print(id, print_chat, "Everybody Can Fly!")
                                }
                                case 1: {
                                        set_user_maxspeed(index, float(speed))
                                        client_print(id, print_chat, "Speed It Up!")
                                }
                                case 2: {
                                        set_user_frags(index, frags)
                                        client_print(id, print_chat, "Your Frags Were Modified!HaHa!")
                                }
                                case 3: {
                                        set_user_health(index, health)
                                        client_print(id, print_chat, "Everybody Is Living High!")
                                }
                                case 4: {
                                        set_user_armor(index, armor)
                                        client_print(id, print_chat, "You Got A Pretty Nice Armor!")
                                }
                                case 5: {
                                        cs_set_user_deaths(index, deaths)
                                        client_print(id, print_chat, "Your Deaths Were Modified!")
                                }
                                case 6: {
                                        set_user_gravity(index, float(hgrav))
                                        client_print(id, print_chat, "Nobody Can Jump Huh?")
                                }
                                case 7: {
                                        client_print(id, print_chat, "Nothing Happened!")
                                }
                               
                        }
                }
        }
        else if(get_pcvar_num(pCvarStatus) == 2) {
                new iRandomNum = random_num(0, 7)
                switch(iRandomNum) {
                        case 0: {
                                set_user_gravity(id, float(gravity))
                                client_print(id, print_chat, "Everybody Can Fly!")
                        }
                        case 1: {
                                set_user_maxspeed(id, float(speed))
                                client_print(id, print_chat, "Speed It Up!")
                        }
                        case 2: {
                                set_user_frags(id, frags)
                                client_print(id, print_chat, "Your Frags Were Modified!HaHa!")
                        }
                        case 3: {
                                set_user_health(id, health)
                                client_print(id, print_chat, "Everybody Is Living High!")
                        }
                        case 4: {
                                set_user_armor(id, armor)
                                client_print(id, print_chat, "You Got A Pretty Nice Armor!")
                        }
                        case 5: {
                                cs_set_user_deaths(id, deaths)
                                client_print(id, print_chat, "Your Deaths Were Modified!")
                        }
                        case 6: {
                                set_user_gravity(id, float(hgrav))
                                client_print(id, print_chat, "Nobody Can Jump Huh?")
                        }
                        case 7: {
                                client_print(id, print_chat, "Nothing Happened!")
                        }
                }
        }
       
        return PLUGIN_CONTINUE;
}
Description:
Every round a special ability is chosen for all the players:
-High Gravity: set by a cvar, every player gets that gravity (higher than 1.0!)
-Gravity: set by a cvar, every player gets that gravity (lower than 1.0 !)
-Speed: set by a cvar, sets every player's maxspeed
-Frags: set by a cvar, sets every player's frags
-Deaths: set by a cvar, sets every player's deaths
-Armor: set by a cvar, sets every player's armor
-Health: set by a cvar, sets every player's HP

Modules:
- Fun
- Cstrike
- HamSandwich

Cvars:
wr_status <0/1> - sets the status of the plugin : 0 - Disabled/1 - Enabled (default : 1 )
wr_gravity - sets the Weird Gravity Value (default : 0.6 )
wr_speed - sets the Weird Speed Value (default: 320 )
wr_frags - sets the Weird Frags Value (default: 0)
wr_deaths - sets the Weird Deaths Value (default: 0)
wr_armor - sets the Weird Armor Value (default: 200)
wr_hp - sets the Weird Armor Value (default: 500)
wr_hgrav - sets the Weird High Gravity Value (default: 9)

Versions:
1.0 - First Release !
1.1 - Fixed some code!
1.2 - Added 2nd status giving everyone something different!
To Do: 
-Multilingual
-Per map powers
-Restrict power menu
Thx to:
xPaw
uNny

Posts

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Original Authors
BreaKer
AMXX Script/Codes
Special Thanks
xPaw
uNny

Submitter

Rj. avatar
Rj. avatar IN PLAYGROUND
Scripts > Add Script Category
Member Joined 10mo
545 points Ranked 7786th
35 medals 4 legendary 9 rare
  • Submitted 15 Tools Medal icon
  • Submitted 50 Gamefiles Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
  • Thanked 500 submitters Medal icon
  • 2nd Place - Game Poetry Contest Medal icon
  • Submitted 5 Tools Medal icon

Rj. avatar
Rj.

Redistributor
Are you the owner? Request Ownership
Send a Private Message to the submitter

Category

Attributes

Language
Pawn (AMXMODX)

Stats

Posts
0
Views
49
Date Added
3d