--------- Posted February 17, 2013 Share Posted February 17, 2013 (edited) For a while now, I have been wanting to try myself at writing addons for sourcemod. I just don't know where to start. I'm looking for tutorials, advice, tips, any other languages I should know, compilers and how you started learning?. Edited August 2, 2013 by Enigmo Quote Link to comment Share on other sites More sharing options...
xafizzle Posted February 17, 2013 Share Posted February 17, 2013 You'll never get as good of a tutorial for pawn as there is for PHP or other major languages. Although it's based off of C, you don't need to learn C. It's a simple language so it shouldn't take much to learn. Start here: http://wiki.alliedmods.net/Introduction_to_SourcePawn. That's about all you'll really need to get started. Quote Link to comment Share on other sites More sharing options...
mccaincracker Posted February 17, 2013 Share Posted February 17, 2013 dat links broken fizzle Quote Link to comment Share on other sites More sharing options...
BlackEyes Posted February 17, 2013 Share Posted February 17, 2013 (edited) Here is the tutorial: http://wiki.alliedmo...n_to_SourcePawn Before you write the mods, you need to get Source Dedicated Server (srcds) to test your mods http://www.srcds.com...l&id=1097362093 Then you need to install metamod. SourceMod is a Metamod. http://wiki.alliedmo..._Metamod:Source Then SourceMod itself so you have the libraries http://wiki.alliedmo...lling_SourceMod To do your coding in SourcePawn, I'd say use the PawnStudio IDE http://sourceforge.n...cts/pawnstudio/ Edited February 17, 2013 by BlackEyes Quote Link to comment Share on other sites More sharing options...
--------- Posted February 18, 2013 Author Share Posted February 18, 2013 (edited) Thanks for the info! Looks good, I'll dive into it when I get home from school. Before you write the mods, you need to get Source Dedicated Server (srcds) to test your mods http://www.srcds.com...l&id=1097362093 Then you need to install metamod. SourceMod is a Metamod. http://wiki.alliedmo..._Metamod:Source Then SourceMod itself so you have the libraries http://wiki.alliedmo...lling_SourceMod I've setup and installed many SRCDS server, so this is second narture. Edited February 18, 2013 by Enigmo Quote Link to comment Share on other sites More sharing options...
--------- Posted February 18, 2013 Author Share Posted February 18, 2013 I call it, BaconMod! I'm quite happy with myself considering I've never coded a SourceMod plugin until a few hours ago. #include <sourcemod> public Plugin:myinfo = { name = "Bacon", author = "Enigmo", description = "Share your love of bacon with everyone.", version = "1.0", url = "www.enigmo.co" } public OnPluginStart(){ RegAdminCmd("sm_bacon", commandBacon, ADMFLAG_SLAY, "Tell everyone how much you love bacon."); } public Action:commandBacon(client, args){ if(args < 1){ PrintToConsole(client, "[baconMod] You need to tell everyone how crispy you like your bacon!"); PrintToConsole(client, "[baconMod] Usage: sm_bacon <crispyness>"); PrintToChat(client, "[baconMod] You need to tell everyone why you love bacon so much!"); PrintToChat(client, "[baconMod] Usage: !bacon \"crispyness\""); return Plugin_Handled; } new String:Arg1[32], String:userName[32]; GetCmdArg(1, Arg1, sizeof(Arg1)); GetClientName(client, userName, sizeof(userName)); PrintToChatAll("[baconMod] %s loves their bacon %s", userName, Arg1); return Plugin_Handled; } Quote Link to comment Share on other sites More sharing options...
Sonick Posted February 18, 2013 Share Posted February 18, 2013 Anything involving bacon is win! Quote Link to comment Share on other sites More sharing options...
suman Posted August 2, 2013 Share Posted August 2, 2013 Try reversing your if statement so that the first statement is the header change. As Enigma stated, outputting crap outside of php tags can cause the buffer to be sent. As such, you cannot modify the headers. Use ob_start too, again as Enigma suggested. Quote Link to comment Share on other sites More sharing options...
Guest The_Monkey Posted August 2, 2013 Share Posted August 2, 2013 Try reversing your if statement so that the first statement is the header change. As Enigma stated, outputting crap outside of php tags can cause the buffer to be sent. As such, you cannot modify the headers. Use ob_start too, again as Enigma suggested. LOL what. 1 Quote Link to comment Share on other sites More sharing options...
Vetman Posted August 2, 2013 Share Posted August 2, 2013 Try reversing your if statement so that the first statement is the header change. As Enigma stated, outputting crap outside of php tags can cause the buffer to be sent. As such, you cannot modify the headers. Use ob_start too, again as Enigma suggested. Quote Link to comment Share on other sites More sharing options...
enigma# Posted August 3, 2013 Share Posted August 3, 2013 I said what? Quote Link to comment Share on other sites More sharing options...
--------- Posted August 3, 2013 Author Share Posted August 3, 2013 LOL what. My exact reaction. Quote Link to comment Share on other sites More sharing options...
Papa John Posted August 3, 2013 Share Posted August 3, 2013 (edited) Try reversing your if statement so that the first statement is the header change. As Enigma stated, outputting crap outside of php tags can cause the buffer to be sent. As such, you cannot modify the headers. Use ob_start too, again as Enigma suggested. Which conversation are you apart of exactly? Because it isn't this one. On topic, the crispyness parameter for the bacon command isn't sanitized to prevent unwanted input, therefor the plugin is inherently flawed. I will not be distributing my love of bacon to the masses using this plugin as a result. Edited August 3, 2013 by Papa John 1 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.