Здравствуйте, гость ( Авторизация | Регистрация )

EventScripts Mods, KnifeOut

<-MonsterKill->
Группа: <Main Admin>

Второй флудер
Ссылка на Сообщение #1 сообщение 30.1.2010, 14:46
KnifeOut
Please refer to this guide on installing eventscripts and eventscripts mods:
HOWTO: Installing Scripts and EventScripts Plugin

CODE
//KNIFEOUT MOD!//
//---CONFIG---//
block load
{
//Set this to 1 to enable the round message
es_xsetinfo round_message 1

//Change what you want the round message to say
es_xsetinfo Round_text "Knife a player to steal their cash!"

//Set this to 1 to enable the mugged announcement
es_xsetinfo announce_mugged 1

//Set this to 1 to enable the attackers taunt
es_xsetinfo attacker_taunt 1

//Set this to 1 to enable the victims cry
es_xsetinfo victims_cry 1

//Set the victims cry message
es_xsetinfo victim_text "I feel violated..."


//DO NOT EDIT BELOW THIS LINE UNLESS YOU ARE AN ADVANCED CODER
//DO NOT RE-RELEASE ANY EDITS WITHOUT THE AUTHORS PERMISSION
//-------------------------------------------------------------
es_xsetinfo Knifeout_1982 1
es_xmakepublic Knifeout_1982 1
// Prints a message to the chat saying the mod has been loaded
es_xmsg urmod_name [KnifeOut] Loaded!
}

block unload
{
es_xsetinfo Knifeout_1982 0
// Prints a message to the chat saying the mod has been unloaded
es_xmsg [KnifeOut] Unloaded!
}

//Executes on every new round
event round_start
{
// If the round_message variable is set to 1 then send the message
if (server_var(round_message) equalto 1) do
{
// Send the user defined message
es_msg [KnifeOUt] server_var(Round_text)
}
}

//Executes on every players death
event player_death
{
// If they are on the opposite team then do the code below
if (event_var(es_attackerteam) notequalto event_var(es_userteam) do
{
// If the weapon is a knife do the below
if (event_var(weapon) equalto knife) do
{
//Store the two cash variables for faster loading
es_xset attacker_cash 0
es_xset victim_cash 0
// Get the attackers cash and put it in the variable "attacker_cash"
es playerget cash attacker_cash event_var(attacker)
// Get the victims cash and put it in the variable "victim_cash"
es playerget cash victim_cash event_var(userid)
// Add the victims cash to the attackers cash
es_math attacker_cash + server_var(victim_cash)
// Set the cash of the attacker to the attacker_cash variable (Which now has the victim cash added to it)
es playerset cash event_var(attacker) attacker_cash
//Print a message With the knifeout part in bright green, saying that: "attacker name here" mugged "victim name here" for "victims cash here"
es_msg #multi#green[KnifeOut]#default event_var(attackername) Mugged event_var(es_username) for server_var(victim_cash)
//Makes the attacker say: Thanks, I really needed an extra "Victims cash here"
es_cexec event_var(attacker) say Thanks, I really needed an extra event_var(victim_cash)
//Makes the victim say the user set text
es_cexec event_var(userid) say server_var(victim_text)
// Sets the victims cash to 0
es playerset cash event_var(userid) 0
//Plays the bot owned sound
es_emitsound player event_var(attacker) "/bots/owned.wav" 1.0 0.6
}
}
}
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0
Похожие темы
Тема Последнее сообщение
eventscripts
8.12.2010, 20:04 Посл. сообщение: Shoker
EventScripts Mods
Surf Boost
30.1.2010, 14:47 Посл. сообщение: s1ege
EventScripts Mods
Dodgemod
30.1.2010, 14:45 Посл. сообщение: s1ege
EventScripts Mods
Funny Slaying Script
30.1.2010, 14:44 Посл. сообщение: s1ege
EventScripts Mods
Gain/Drain (Fun Script)
30.1.2010, 14:43 Посл. сообщение: s1ege

Случайные сервера

[RUS](47/48)CSRulez.​ru​ ]Surf[
surf_iceday_final
ИГРОКОВ: 0 / 20
[RUS](47/48)CSRulez.​ru​ ]ZombieBiohazard[
zm_kabal_map2
ИГРОКОВ: 0 / 31
[RUS](47/48)CSRulez.​ru​ ]Jump[
kz_climbers_b01
ИГРОКОВ: 0 / 20
[RUS](47/48)CSRulez.​ru​ ]hns 364[
hns_bronx
ИГРОКОВ: 0 / 21