nielsfalko Posted May 21, 2016 Share Posted May 21, 2016 hai all people in da coding world i like doing stuff with console and like that but i would like to learn or see how it is like big coding or source mod if anyone would like to teach me it or show me around i would apricate it nielsfalko Quote Link to comment Share on other sites More sharing options...
FoxHound Posted May 21, 2016 Share Posted May 21, 2016 I'm not sure doing stuff in console counts as coding just fyi... 1 Quote Link to comment Share on other sites More sharing options...
nielsfalko Posted May 21, 2016 Author Share Posted May 21, 2016 oi thats what i mean i like messing around in console so thats why i wanne learn coding and stuff Quote Link to comment Share on other sites More sharing options...
Burnt Posted May 22, 2016 Share Posted May 22, 2016 Basically read that wiki, you can ask me questions if you want. Generally I point people to that wiki when they ask me to teach them, no one ever comes back with questions or follows through. 1 Quote Link to comment Share on other sites More sharing options...
Thomasjosif Posted May 23, 2016 Share Posted May 23, 2016 Basically read that wiki, you can ask me questions if you want. Generally I point people to that wiki when they ask me to teach them, no one ever comes back with questions or follows through. Except me, back when I was a mod 1 Quote Link to comment Share on other sites More sharing options...
FoxHound Posted May 23, 2016 Share Posted May 23, 2016 Except me, back when I was a mod what a terrible day for hellsgamers 1 Quote Link to comment Share on other sites More sharing options...
nielsfalko Posted May 23, 2016 Author Share Posted May 23, 2016 oh ya btw i got a server now setup with sm and shiet but is there anyway i can get the plugins that we youse on our jb server ? so i can put em on mine? Quote Link to comment Share on other sites More sharing options...
Suicide Posted May 23, 2016 Share Posted May 23, 2016 oh ya btw i got a server now setup with sm and shiet but is there anyway i can get the plugins that we youse on our jb server ? so i can put em on mine? No. 1 Quote Link to comment Share on other sites More sharing options...
Thomasjosif Posted May 23, 2016 Share Posted May 23, 2016 oh ya btw i got a server now setup with sm and shiet but is there anyway i can get the plugins that we youse on our jb server ? so i can put em on mine? Lol. 2 Quote Link to comment Share on other sites More sharing options...
nielsfalko Posted May 23, 2016 Author Share Posted May 23, 2016 (edited) (im not trying to steal your servers stuff i would just like to test it like debug) Edited May 23, 2016 by nielsfalko Quote Link to comment Share on other sites More sharing options...
Suicide Posted May 23, 2016 Share Posted May 23, 2016 (im not trying to steal your servers stuff i would just like to test it like debug) You don't need our plugins to learn coding, nor will you ever. There are hundreds of sources you can find on alliedmods, mess around with those. Quote Link to comment Share on other sites More sharing options...
Burnt Posted May 23, 2016 Share Posted May 23, 2016 (im not trying to steal your servers stuff i would just like to test it like debug) Most staff don't even have access to our plugins. Not only will you not get access to those any time soon, but not many will really. Even if you did have the plugins, you wouldn't be able to see the source for it so there is no point in hosting a dedicated server just to play jailbreak alone. The source is highly protected, and with the little knowledge you have of sourcemod it would not benefit you to see such a complex set of plugins in their entirety. If you want I will write something simple using as many concepts as I can and you can see how the code works on your own server. Quote Link to comment Share on other sites More sharing options...
nielsfalko Posted May 23, 2016 Author Share Posted May 23, 2016 I would like that yes burnt I tried to make the plugin with the wiki dunno what I did wrong but did not work Quote Link to comment Share on other sites More sharing options...
Suicide Posted May 23, 2016 Share Posted May 23, 2016 I would like that yes burnt I tried to make the plugin with the wiki dunno what I did wrong but did not work Paste the code. Quote Link to comment Share on other sites More sharing options...
nielsfalko Posted May 24, 2016 Author Share Posted May 24, 2016 (edited) #include <sourcemod> public Plugin myinfo = { name = "test 123", author = "nielsfalko", description = "My first plugin ever", version = "1.0", url = "http://www.sourcemod.net/" }; public void onpluginstart() { PrintToServer("hello world") } Edited May 24, 2016 by nielsfalko Quote Link to comment Share on other sites More sharing options...
Burnt Posted May 24, 2016 Share Posted May 24, 2016 #include <sourcemod> public Plugin myinfo = { name = "test 123", author = "nielsfalko", description = "My first plugin ever", version = "1.0", url = "http://www.sourcemod.net/" }; public void onpluginstart() { PrintToServer("hello world"); //You forgot the semi-colon } Quote Link to comment Share on other sites More sharing options...
Thomasjosif Posted May 24, 2016 Share Posted May 24, 2016 This was one of the first plugins I ever built. Its kinda shitty but you can see some new concepts that you might not know. #include <sourcemod> //include sourcemod which is required #include <sdktools> //Sdk tools is something I always include #include <cstrike> //As this is for cstrike I included cstrike for checking the team #define HG "[\x04HG\x01]\x04" //Define our custom prefix new Float:Office[3] = {-1921.8, 838.5, 308.0}; //Register the teleport location new bool:TP_Allowed = true; //Bool to disable the command (I should have used a convar) new bool:TP_Enabled = true; //Bool to disable the command after 30 seconds of round start new Handle: TPTIMER; //Timer handle public Plugin:myinfo = { //My beautiful info name = "Thomasjosif's Cell opener", author = "[HG] Thomasjosif [M]", description = "", url = "https://hellsgamers.com" }; public OnPluginStart() //Called when the plugin starts { RegConsoleCmd("sm_cells", hg_cells,""); //Reg the command that everyone can use RegAdminCmd("sm_cellson", hg_cellson,ADMFLAG_UNBAN,""); //Debug commands that only people with the "unban flag" can use RegAdminCmd("sm_cellsoff", hg_cellsoff,ADMFLAG_UNBAN,""); HookEvent("round_start", OnRoundStart); //Hook round start } public OnRoundStart(Handle event, const char[] name, bool db) //Called on round start { TP_Allowed = true; //Enables the command CreateTimer(30.0, Can_Use_TP,Handle:TPTIMER); //Creates a 30 second timer } public Action Can_Use_TP(Handle timer) //Timer callback { TP_Allowed = false; //Disables the command } // // //Debug // // public Action:hg_cellson(client, args) { if(!TP_Allowed) //If teleport is auto disabled it will enable it { TP_Enabled = true; TP_Allowed = true; PrintToChatAll("%s \x01 %N \x04 has manually re-enabled Warden's Office teleport.", HG, client); return Plugin_Handled; } else //Does the same thing with a different message. This could have been compressed alot but again, this was my first plugin. { TP_Enabled = true; TP_Allowed = true; PrintToChatAll("%s \x01 %N \x04 has manually enabled Warden's Office teleport.", HG, client); //%S is the string for HG which is our prefix. client is the client index of the person running the command which we can print with %N return Plugin_Handled; //Return that the plugin has successfully completed } } public Action:hg_cellsoff(client, args) //opposite of the above command { if(!TP_Enabled) { PrintToChat(client, "[\x04HG\x01]\x04 Teleport is allready manually disabled!"); //Manually used the prefix here for some reason. return Plugin_Handled; } else { TP_Enabled = false; TP_Allowed = false; PrintToChatAll("%s \x01 %N \x04 has manually disabled Warden's Office teleport.", HG, client); return Plugin_Handled; } } // // //Command // // public Action:hg_cells(client, args) //The command client is the client args although this is sourcemod 1.6 which is different from sourcemod 1.7 where it changes { if(!TP_Enabled) //If the command is disabled stop and print a message { PrintToChat(client, "%s Command has been disabled.", HG) return Plugin_Handled } else if(!TP_Allowed) //If 30 seconds has passed stop and print a messages { PrintToChat(client, "%s Command cant be used past the first\x07 30 seconds \x04of the round!", HG); return Plugin_Handled; } else if(GetClientTeam(client) != CS_TEAM_CT) //If the client is on spec/t do not allow it { PrintToChat(client, "%s Only Guards can teleport to the Warden's Office!", HG); return Plugin_Handled; } else //Everthing checks out here lets go to the next sptep { if(!IsPlayerAlive(client)) //Are they alive? } PrintToChat(client, "%s You must be alive to teleport to the Warden's Office!", HG); return Plugin_Handled; } else //Lets teleport them now. { TeleportEntity(client, Office, NULL_VECTOR , NULL_VECTOR); PrintToChat(client, "%s You have been teleported to the Warden's Office!", HG); return Plugin_Handled; } } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.