I made this file for starters. With these you will learn how to make easy addons. Example now you can make your own addon what show how much damage you did to your enemy! Tutorial made by : Siili |-- --| | | |-- --||----| || | | || | | || |__| || |____| --------------------------------------------------------------------------- Here is some commands what you should know before start ___________ !Important!|______________________________________ Always put this on beginig of your text file! | | Block load | es_xsetinfo "addon name" "version" "made by?" | es_xmakepublic "addon name" | -------------------------------------------------| es_msg //This is simple msg which will appear in chat area es_tell //This will be seen only by player who you have decided es_centermsg //This is simple msg which will appear in middle of your srceen #green //This chances text colour #lightgreen //This is text coulout event_var(userid) //this comes after es_tell event_var(es_attackername) //This is used for show who attacked on you. Used after es_msg or es_tell event_var(attackerhealt) //This shows how much killer of yours still got hp left. Used after es_msg or es_tell event_var(es_username) //This will show playername what you want (example event bomb_planted { es_msg #green event_var(playername) Has planted the bomb! } event_var(steamid) //This show palyer steamid. This is usualy used if you make addon which shows who have joined to game event_var(ip) //This show your server ip I think here was all what you need to get to begining ----------------------------------------------------------------------------- event round_start es_centermsg Fight! ------------------------------------------------------------------------------ event round_start/end palyer_spawn/death here can be many // sends a single message to everyone es_msg Hello World ------------------------------------------------------------------------------ event round_start/end // Announces the gravity value es_msg The server's gravity is server_var(sv_gravity) ----------------------------------------------------------------------------- event round_start/end palyer_spawn/death here can be many // Announces in light green (CS:S only) es_msg #green Hello! ------------------------------------------------------------------------------ event round_start/end palyer_spawn/death here can be many // Announces in multi-color // outputs a multi-colored message es_msg #multi Change to#green green then change to#default default, then change to#lightgreen light green. -------------------------------------------------------------------------------- event round_start/end palyer_spawn/death here can be many //example for CSS and DODS es_tell event_var(userid) #multi #green [My green text]#default This text is yellow!#lightgreen And this is light green! ---------------------------------------------------------------------------------- event round_start //give the player an awp es_give event_var(userid) weapon_awp --------------------------------------------------------------------------------- event round_start/end // Get the player count es_xsetinfo players 0 getplayercount players #all es_msg server_var(players) Players on the server! getplayercount players #human es_msg server_var(players) Humans on the server! getplayercount players #bot es_msg server_var(players) Bots on the server! ----------------------------------------------------------------------------- "name" - Name "steamid" - SteamID "index" - Player's entity index "teamid" - Team IDs: 0 = Unassigned, 1 = Spectator, 2 = Terrorist, 3 = Counter-Terrorist "kills" - Kills "deaths" - Deaths "armor" - Armor "model" - Player's model name "isdead" - 1 = Dead, 0 = Alive "isbot" - 1 = Bot, 0 = Client "isobserver" - 1 = SourceTV Bot, 0 = Client/Bot "health" - Health "serialnumber" - Unknown "weapon" - Uses the "weapon_" prefix, then the source name, e.g. * weapon_scout "handle" - Player's handle (hOwner property) "ping" - Ping "packetloss" - Amount of packet loss with client "timeconnected" - Time in minutes (?) how long player is connected "address" - IP Address "x" - X Coordinates "y" - Y Coordinates "z" - Z Coordinates ------------------------------------------------------------------------------- // Will output the ping of the player es_xset userping 0 es getplayerinfo userping event_var(userid) ping -------------------------------------------------------------------------------- event player_hurt { // player makes a weird sound whenever they are hurt es_emitsound player event_var(userid) ambient/tones/elev4.wav 1.0 0.5 } ------------------------------------------------------------------------------ event player_spawn { // Forces player to purchase a deagle es_cexec event_var(userid) buy weapon_deagle } ----------------------------------------------------------------------------- // force an attacker to drop their awp if (event_var(weapon) equalto awp) do { es_sexec event_var(attacker) use weapon_awp es_sexec event_var(attacker) drop } ----------------------------------------------------------------------------- block load { // vote requires corelib es_load corelib } event es_client_command { // every script that wants to do a vote needs to include a vote listener line in es_client_command vote listener } event player_say { if (event_var(text) equalto "!voteboy") do { // syntax: // vote start [option3] [option4] ... [option9] vote start voteboy 10 votetester/vote_done "What map do you want?" "de_dust" "cs_italy" "de_dust2" "scoutzknivez" "cs_office" } } // this is the block we configured to be called when the vote is over. block vote_done { if (server_var(vote_answertext) != 0) do { es_msg #green Vote done: Map will change in 5 seconds to server_var(vote_answertext) es_delayed 5 changelevel server_var(vote_answertext) } else do { es_msg #green Vote cancelled: not enough votes. } } -------------------------------------------------------------------------------- event es_client_command { if (event_var(command) == "!amenu") do { es_getplayersteamid admin_var event_var(userid) if (server_var(admin_var) in server_var(admins_list)) do { es popup close menu3 event_var(userid) es popup send menu3 event_var(userid) } } } event player_say { if (event_var(text) == "!amenu") do { if (event_var(text) == "!amenu") do { es_getplayersteamid admin_var event_var(userid) if (server_var(admin_var) in server_var(admins_list)) do { es popup close menu3 event_var(userid) es popup send menu3 event_var(userid) } else do { es_tell event_var(userid) #lightgreen You don't have access to this. } } } } ---------------------------------------------------------------------------- event player_activate es_msg #green Player event_var(es_username) is ready for battle! ---------------------------------------------------------------------------- event player_spawn es_give es_give 320 weapon_ak47 This will give all player a hegrenade es_give event_var(userid) weapon_hegrenade --------------------------------------------------------------------------- event player_death es_tell [color] es_tell event_var(userid) You were killed by event_var(es_attackername) who has event_var(es_attackerhealth) health left! --------------------------------------------------------------------------- event player_disconnect es_delayed