25.06.2012, 10:34
Hey.
You need to be able to do some research yourself.
Check this part of the forum for scripts people have released.
If you want make something yourself, however, you need to work out how it needs to be made.
For example, C:
You need to be able to do some research yourself.
Check this part of the forum for scripts people have released.
If you want make something yourself, however, you need to work out how it needs to be made.
For example, C:
pawn Код:
When the player types the /mute command{
Check if they are an admin
Check if they have typed a valid name/ID of another player (make sure the player is online too)
Check if the player is already muted (and either extend the mute time, or just prevent them from being muted again)
//Additonal checks will need to go here
After passing all the checks, set a variable to declare that the player is muted
If you want admins to be able to type the length of time, you will need to process that before here
Set a timer to mute the player for X amount of time
Tell the player they are muted, tell the admin they have muted the player
}
timer function{
Reset the variable that declares the player as muted
Tell the player to follow the rules and that they are unmuted
}
When a player tries to talk{
If the variable that declares players as muted is true, prevent the player from talking
}
//This is pseudocode. Do not try to run it in PAWN because it will not work at all
//This tells how a script for question C would work