SA-MP Forums Archive
Scripting help and tips from a professional programmer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scripting help and tips from a professional programmer (/showthread.php?tid=179902)



Scripting help and tips from a professional programmer - samgreen - 29.09.2010

I would like to offer a chance for some of you to have your scripts reviewed and analyzed line by line. I am a professional programmer by day, and I have been working with Pawn inside of SA:MP scripts for about four years now. Obviously I won't be able to review all scripts, but I am willing to take a look at the first few posted here. This is not an offer to fix broken scripts, which many others on this forum can help you with. I am offering to optimize and explain small changes in code.

Who will be brave enough to give me some code to start with?


Re: Scripting help and tips from a professional programmer - Grim_ - 29.09.2010

I believe the question you're asking is, "Who will be brave enough to give me a free script?".


Re: Scripting help and tips from a professional programmer - willsuckformoney - 29.09.2010

I say new scripter that is making a TDM Gamemode and don't know what to script so is asking others for their scripts.


Re: Scripting help and tips from a professional programmer - Retardedwolf - 29.09.2010

http://paste.pastebin.com/LCDz1UmN

Please don't steal my script please don't i swear if you do i kill you


Re: Scripting help and tips from a professional programmer - Kyosaur - 29.09.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
http://paste.pastebin.com/LCDz1UmN

Please don't steal my script please don't i swear if you do i kill you
Wow, very nice work jax!


Re: Scripting help and tips from a professional programmer - Hal - 29.09.2010

can you explain this code for me?

pawn Код:
Public OnGameModeInit()

    SendRconCommand( "exit" );
No one wants to give you their script for free, and firstly saying who will be brave enough make you sound slimy to start with.


Re: Scripting help and tips from a professional programmer - samgreen - 29.09.2010

I have developed many scripts. I am not interested in stealing your work. All of my scripts were released open source, so I have no problem with people "stealing my work". Look at my registration date and past posts if you think I am here to steal scripts.

Furthermore I am not interested in your full scripts. Post small functions and excerpts and I will post improved versions. If you don't want my help please move along. I don't need your input in this thread. If you would like a pawn script that has been optimized by a professional programmer who has worked on AAA games, welcome to this thread.


Re: Scripting help and tips from a professional programmer - samgreen - 29.09.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
http://paste.pastebin.com/LCDz1UmN

Please don't steal my script please don't i swear if you do i kill you
Updated script found here. You can view a unified diff here, removed lines are in red, added lines are in purple. It compiles with no warnings, but I have not tested it on a server. Let me know if you encounter any new issues.

Again I would prefer to optimize smaller functions rather than entire scripts. But I am open to anything you would like me to review. I hope this will demonstrate to the community that I'm not your typical SA:MP forums troll. I have been working in the games industry for years. If you want my help I am offering it.

Edit: Updated pastebin link.


Re: Scripting help and tips from a professional programmer - Retardedwolf - 29.09.2010

Quote:
Originally Posted by samgreen
Посмотреть сообщение
Updated script found here. You can view a unified diff here, removed lines are in red, added lines are in purple. It compiles with no warnings, but I have not tested it on a server. Let me know if you encounter any new issues.

Again I would prefer to optimize smaller functions rather than entire scripts. But I am open to anything you would like me to review. I hope this will demonstrate to the community that I'm not your typical SA:MP forums troll. I have been working in the games industry for years. If you want my help I am offering it.
+1. I thought you were just some retard trying to rip off scripts btw you forgot a ';' at line 196.


Re: Scripting help and tips from a professional programmer - samgreen - 29.09.2010

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
+1. I thought you were just some retard trying to rip off scripts btw you forgot a ';' at line 196.
Good eye thanks, I've updated the pastebin link again. I added line 11 to force semi-colon checks. This is such a great pragma that I recommend all scripters add this to their a_samp.inc file.