
Well that's it for Episode two of this series. Since the Steam ids are in there, the command line will continue on. Now if you reference the line: if (event_var(es_steamid) in server_var(admins)) do You will see that it checks the variable set for admins. This is setting the information that these steam ids are admins. I don't know to much about expanding variables, this time of night anyway, so I won't go into it.Īs you can see, there are two steamIDs in the the first line: es_xsetinfo admins "STEAM:X:X:XXXXXXX STEAM:X:X:XXXXXXX" Es_xsetinfo is a lot better for the processor, as it is executed quicker. The only difference between the two commands, is that es_setinfo expands, where as es_xsetinfo doesn't. These commands are very handy when you want to use config settings, or just don't want to type the same thing over and over again. You can see now, in block load, that there are two new commands. The following script will check the status of the player when they type a chat command, and issue commands accordingly:Įs_xsetinfo admins "STEAM:X:X:XXXXXXX STEAM:X:X:XXXXXXX"Įs_setinfo access_msg "You Do not have the access to use this command!"Įs_tell event_var(userid) You are an Admin!Įs_tell event_var(userid) server_var(access_msg)
#Eventscripts commands csgo how to
OK now I am going to show you how to use block Load properly. You MUST ALWAYS HAVE THE SAME AMOUNT OF CLOSED SYNTAX AS YOU DO OPEN. This is caused by the command else do If we didn't want the players to receive a message or another command etc, we would have done the following:Īs you can see, there are now only 6 Syntax symbols 3 open and 3 close. If however, the team is not the same as the script, he would receive the text: You must be on the Terrorist team to do this! This script pretty much checks the players team when they spawn, and if it is equal to the team specified (in this case terrorists) it will continue on with the second command line. If (event_var(es_steamid) in server_var(admins)) doĮs playerset color event_var(userid) 255 255 255 255Įs_tell event_var(userid) you do not have the permission to do this!Įs_tell event_var(userid) You must be on the Terrorist team to do this! Here is an example of syntax, with proper commands: Commands on command line 2, will be issued at the same time, provided they pass the checks for command line 1. Commands under the same Event (event player_spawn etc) and on the same syntax line:Īny commands under command line 1, will be executed at the same time. ma_give event_var(userid) weapon_awp - DOES NOT WORKĪlso keep in mind, the syntax symbols These are Very important! Your script will not work, if there are an uneven number of these anywhere. es ma_give event_var(userid) weapon_awp - WORKS es_delayed 10 ma_give event_var(userid) weapon_awp - WORKS If you are going to enter it into the script though, be sure to always start the line with es.
#Eventscripts commands csgo mod
Est, mani, source mod commands can be entered into scripts, same as a eventscripts command.

If you look closely, you will see an EST command. Now we will give each team a different set of commands when they spawn.Įs_tell event_var(userid) #multi #greenYou were given an AK47Īs you can see, we gave the terrorists an awps, and the CT's ak47s and 100 health.


Terrorist team = 2, Counter Terrorists team = 3, Spectators team = 1. This command checks the users team, and determines whether the script is continued depending on the users team. Ok, now look at the second command: if (event_var(es_userteam) = 2) do. Now we are going to build on this, and make it issue those commands to the terrorist team only. In the previous tutorial I showed you how to issue commands when a player spawns, using the following method:Įs_tell event_var(userid) #multi #greenYou were given an awpĮs_tell event_var(userid) #multi #greenYour STEAMID is:#lightgreen event_var(es_steamid). It's hard to explain, so I will just get straight into it, and show you what I mean. Ok this tutorial is going to show you how to add more stuff to events.
#Eventscripts commands csgo pro
Ok by now I expect you all to be pro scripters, and know every command known to eventscripts.
