I had a moment of inspiration the other day to create my own plugin. I have been having a bit of trouble with that so far, though...
I understand how things work pretty well, and when I read an SMA file written by someone else, I understand, generaly, what everything does. I am skilled enough to edit some things, even copy and past parts of already designed plugins together to create something I like... but I have yet to learn how to write the code, from scratch, on my own.
I spent probably way too many hours yesterday trying to figure out the ins and outs of designing my own plugin, and I have come to a point where I realize that I am not going to accomplish anything until I ask for help...
The plugin I want to design is a run-off of PM's Neo Reloaded Superhero.
http://forums.alliedmods.net/showthr...t=Neo+Reloaded
What I would like is a toggle command that all admins with a certain level of access can use to trigger all players entering a Matrix Phase.
When the last of all admins let go of this button, if there were more than one, everyone will leave the Matrix Phase.
There will be x seconds minimum time for everyone to be in the Matrix Phase, and y seconds of a cooldown before the matrix phase can be activated again where x is the durration of the sound used to represent entering the Matrix Phase, and y is the durration of the sound used to represent leaving the Matrix Phase.
My order of operations for scripting this is as follows:
Code:
The Powers of Neo
{
On activation of Toggle key +BulletTime
Set the status ActivatingBulletTime as True for that individual player
If no other person has the status ActivatingBulletTime set to true {
If cooldown countdown timer = 0 {
Lower speed of all non-admin players
Lower speed of all admin players
Lower gravity of all non-admin players
Lower gravity of all admin players
Lower bullet speed of all non-admin players
Lower bullet speed of all admin players
Give bullet trails to all bullets
Gives admins the ability to stop bullets that enter a certain distance from them
If bullettime countdown timer = 0
Play bullettime_start.wav to all players
Start bullettime countdown timer of 2 seconds
Else {
Remove task that waits for bullettime countdown
}
}
Else {
Set task to wait for cooldown countdown
When cooldown countdown hits 0
Lower speed of all non-admin players
Lower speed of all admin players
Lower gravity of all non-admin players
Lower gravity of all admin players
Lower bullet speed of all non-admin players
Lower bullet speed of all admin players
Give bullet trails to all bullets
Gives admins the ability to stop bullets that enter a certain distance from them
Play bullettime_start.wav to all players
Start bullettime countdown timer of 2 seconds
}
}
}
On activation of Toggle key -BulletTime {
Set the status ActivatingBulletTime as False for that individual player
If no other person has the status ActivatingBulletTime set to true {
If cooldown countdown timer = 0 {
If bullettime countdown timer = 0 {
Return Speed of all players to default
Return Gravity of all players to default
Return Speed of all bullets to default
Remove bullet trails
Removes the ability to stop bullets from admins
Play bullettime_end.wav to all players
start cooldown countdown timer of 2 seconds
}
Else {
Set task to wait for bullettime countdown
When bullet countdown hits 0
Return Speed of all players to default
Return Gravity of all players to default
Return Speed of all bullets to default
Remove bullet trails
Removes the ability to stop bullets from admins
Play bullettime_end.wav to all players
start cooldown countdown timer of 2 seconds
}
}
Else {
Remove task that waits for cooldown countdown
}
}
}
It may be a bit too much to ask, but I was wondering if someone can help me script this so I can understand how each of these things works in the language. Pretty Please? ^.^
Mewing,
SillyElla
__________________
"And if it all falls apart, I will know deep in my heart, the only dream that mattered had come true. In this life, I was loved by you."