SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 14/01/2017, 09:58 PM   #1
PeanutButter
Big Clucker
 
PeanutButter's Avatar
 
Join Date: May 2015
Location: Belgium
Posts: 105
Reputation: 35
Post PAWN for SA-MP in Sublime Text 3

PAWN for SA-MP in Sublime Text 3


About

Sublime Text 3 is a highly customizable Text-editor with a lot of cool features, that you don't get using the standard Pawno-editor or Notepad++. I know there are already a bunch of tutorials about this, but they don't explain how to install packages very well, which can be confusing for beginners and I added some instructions on using the program.
  • You can fully customize the editor to something you feel comfortable with.
  • Writing code is faster because of the auto-completion and a smart auto-correction.
  • Your code will look a lot cleaner with the neat indentation it offers.
  • A lot of useful (customizable) Keyboard Shortcuts to write code more easily.
  • It also works for a lot of other languages, so it can be used as your primary text editor.
  • Sublime Text is available for Windows, OS X and and Linux.

Features

Auto-completion






Some pre-made Color Schemes








Some pre-made shortcuts

http://docs.sublimetext.info/en/late...tcuts_win.html



Installing

Downloads
Click here - Download and Install the latest Sublime Text
Click here - Download the Package Control file for sublime


Installing the syntax
  1. Download and Install Sublime Text
  2. Download the Package Control file
  3. Paste the Package Control file into C:\Users\Your PC Username\AppData\Roaming\Sublime Text 3\Installed Packages
  4. Open Sublime Text 3 - or restart if already open
  5. Go to Preferences>Package Control and choose Install Package and wait until a new window pops up
  6. Search for pawn and click on Pawn Syntax, wait until it's installed
  7. You can now change the syntax to PAWN in the Lower right corner or View>Syntax>Pawn

You can now start writing SendClientMessage to see if the auto-completion works. If it doesn't you didn't complete these steps successfully.

Installing the compiler
  1. Go to Tools>Build System>New Build System
  2. Replace the code with this code:
    Code:
    {
    	"cmd": ["pawncc.exe", "-i includes", "$file", "-;+"],
    	"path": "C:/path/to/pawno/folder"
    }
  3. You have to change the path to the folder containing pawncc.exe (e.g. "C:/Users/Name/Desktop/MyServer/pawno"), make sure the slashes from your path are / and not \.
  4. Save the file (remember the name) and close the tab
  5. Restart the program
  6. Set your build system: Tools>Build System>name you chose
  7. You can now press Ctrl+B to compile the the code.

Congratulations, you're done



Extra instructions

How can I change the compile button?
  1. Go to Preferences>Key Bindings
  2. Search for build with Ctrl+F
  3. You can replace the current key with something new (e.g. F5)
    You should see something like this:
    Code:
    { "keys": ["ctrl+b"], "command": "build" },
  4. Save the file and restart Sublime Text 3


How can I change the color scheme?
  1. Go to Preferences>Color Scheme
  2. Try out some color schemes. Not satisfied? Go to the next quesion...

How can I get new color schemes?
  1. Go to Preferences>Package Control and choose Install Package
  2. You can search for color schemes between these packages

Indentation
  • Go to View>Indentation
    I recommend Tab Width 4
  • You can adjust the indentation by selecting the line(s) and pressing Ctrl+[ and Ctrl+].
    Or with the Tab button.


More tips

11 Sublime Text Tips for Productivity and a Faster Workflow
__________________
MY TUTORIALS
MY INCLUDES

Last edited by PeanutButter; 01/02/2017 at 03:21 PM.
PeanutButter is offline   Reply With Quote
Old 14/01/2017, 10:06 PM   #2
Eoussama
High-roller
 
Eoussama's Avatar
 
Join Date: Jul 2016
Location: Kingdom of Morocco // Tangier
Posts: 1,071
Reputation: 266
Default Re: PAWN for SA-MP in Sublime Text 3

As a regular sublime text user, I really think people should consider using this editor,
Nice explanation, I remember having trouble back when I first intended to install sublime text, there was really no accurate tutorials on how to do it
__________________

|===[Web taxi]===|
List of my work
Github
Pastebin

|===[Interesting topics]===|
Semantic Versioning
Eoussama is offline   Reply With Quote
Old 15/01/2017, 03:39 AM   #3
princejeet1510
Big Clucker
 
princejeet1510's Avatar
 
Join Date: Mar 2016
Location: Trying to figure it out.
Posts: 115
Reputation: 4
Default Re: PAWN for SA-MP in Sublime Text 3

Nice one mate TBH didn't noticed that it exists though and have much good shit in it as you explained...
+1
PS: please help me out the compiling part doesn't work.
And please tell that should I place pawncc.exe file the game mode or the all files of pawno folder.
__________________

Last edited by princejeet1510; 16/01/2017 at 02:54 AM.
princejeet1510 is offline   Reply With Quote
Old 16/01/2017, 01:56 AM   #4
Eloy
Huge Clucker
 
Join Date: May 2016
Location: Venezuela
Posts: 260
Reputation: 4
Default Respuesta: PAWN for SA-MP in Sublime Text 3

Good tutorial, i love sublime text 3, Good Post
Eloy is offline   Reply With Quote
Old 16/01/2017, 10:40 AM   #5
View
Big Clucker
 
Join Date: Jan 2013
Posts: 92
Reputation: 8
Default Re: PAWN for SA-MP in Sublime Text 3

What I did wrong?

PHP Code:

__init__
() got an unexpected keyword argument 'Cmd' 
__________________


Hospedagem SA:MP | VPS | Domínios | Minicraft | Streaming e muito mais...!

100% Proteção


HeavyHost
View is offline   Reply With Quote
Old 16/01/2017, 03:42 PM   #6
PeanutButter
Big Clucker
 
PeanutButter's Avatar
 
Join Date: May 2015
Location: Belgium
Posts: 105
Reputation: 35
Default Re: PAWN for SA-MP in Sublime Text 3

Quote:
Originally Posted by View View Post
What I did wrong?

PHP Code:

__init__
() got an unexpected keyword argument 'Cmd' 
There is a problem in your build system (compiler)
You wrote Cmd instead of cmd.

It should look like this:
Code:
{
	"cmd": ["pawncc.exe", "-i includes", "$file", "-;+"],
	"path": "C:/path/to/pawno/folder"
}
To fix it you have to edit the file that you made, located in:
C:\Users\YOUR PC USERNAME HERE\AppData\Roaming\Sublime Text 3\Packages\User
and Change Cmd to cmd
__________________
MY TUTORIALS
MY INCLUDES
PeanutButter is offline   Reply With Quote
Old 16/01/2017, 05:00 PM   #7
PeanutButter
Big Clucker
 
PeanutButter's Avatar
 
Join Date: May 2015
Location: Belgium
Posts: 105
Reputation: 35
Default Re: PAWN for SA-MP in Sublime Text 3

Quote:
Originally Posted by princejeet1510 View Post
PS: please help me out the compiling part doesn't work.
And please tell that should I place pawncc.exe file the game mode or the all files of pawno folder.
Which part isn't working?
Actually it doesn't really matter where your pawncc.exe is. Just make sure that the path is correct.

If for example this is the location of pawncc.exe:
C:\Users\name\Desktop\MyServer\pawno\pawncc.exe

Then this should be your path:
C:/Users/name/Desktop/MyServer/pawno

So the path that you have to write for you build file doesn't have \ but /
and the path does not end with pawncc.exe
__________________
MY TUTORIALS
MY INCLUDES
PeanutButter is offline   Reply With Quote
Old 16/01/2017, 06:23 PM   #8
View
Big Clucker
 
Join Date: Jan 2013
Posts: 92
Reputation: 8
Default Re: PAWN for SA-MP in Sublime Text 3

Perfect , Thank you.
__________________


Hospedagem SA:MP | VPS | Domínios | Minicraft | Streaming e muito mais...!

100% Proteção


HeavyHost
View is offline   Reply With Quote
Old 17/01/2017, 09:14 PM   #9
Dayrion
High-roller
 
Dayrion's Avatar
 
Join Date: Jan 2016
Location: France
Posts: 1,922
Reputation: 258
Default Re: PAWN for SA-MP in Sublime Text 3

Anyone know who can we get this ?
I'm using Sulime Text since some times and never finnd it : https://gyazo.com/8d45f23521877f7eb07dac9e490d441d
__________________
actor_plus - v5.0.2
« I'm a goner, somebody catch my breath,
I'm a goner, somebody catch my breath »
Dayrion is offline   Reply With Quote
Old 17/01/2017, 09:38 PM   #10
Yaa
Banned
 
Join Date: May 2016
Location: = GetPlayerHouse("Yaa", 0.2);
Posts: 598
Reputation: 42
Default Re: PAWN for SA-MP in Sublime Text 3

i love you man, i was searching for this from a lonnnnnnnnnnnng time THANKS
+REP
Yaa is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pawn Compiler in Sublime Text 2 Conroy Tutorials 18 17/12/2016 07:44 AM
Sublime text and pawn? danielpalade Scripting Help 1 12/09/2016 12:42 AM
[Tool/Web/Other] Sublime Text 2 with PAWN included Andre02 Tools and Files 8 14/08/2016 12:08 PM
[Tutorial] PAWN for SA-MP in Sublime Text 2 Macluawn Tutorials 69 15/08/2015 03:04 AM


All times are GMT. The time now is 11:01 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.