Jump to content

Tutorial SAMP Scripting : Notepad++


Maurice

Recommended Posts

autocomplete.gif

Am ales sa va prezint si voua cum lucrez eu in Pawno, folosind Notepad++ !
Puteti sa vedeti o parte din facilitatile Notepad++ (auto-complete) in poza de mai sus !
Pentru a putea folosi si voi Pawno in Notepad++ trebuie sa urmati cu atentie urmatorii pasi:

1. Downloadam Notepad++ de aici: http://notepad-plus-plus.org/ (apasam pe butonul “Download” din stanga)
Atentie: Downloadati versiunea de 32-bit!

2. Dupa ce l-am instalat intram in My Computer (Computer pentru Windows 7 / Vista, sau This PC pentru cei cu Windows 10)

3. Scriem in casuta de sus, unde deobicei apare adresa folderului curent

%appdata%\Notepad++

2016_11_07_2215.png

4. Downloadam pachetul cu fisierele .xml de aici:

Download Link (tutoriale-pe.net): click

5. Fisierul userDefineLang.xml il punem in locatia deschisa la pasul 3


2016_11_07_2358.png

6. Acum asociem extensiile .pwn cu Notepad++ ! Deschidem Notepad++ si intram in Settings > Preferences si selectam tab-ul “File Association” ! Mai departe dam click pe customize (sub Suported exts) si apasam pe sageata , iar apoi pe Close!

2016_11_08_0002.png

7. Acum vom avea nevoie de un fisier API pentru a putea sa utilizam functia auto-complete! Fisierul se numeste PAWN.xml si a fost downloadat la pasul 4

Pentru cei cu sitem de operare 32-bit: C:\Program Files\Notepad++\plugins\APIs
Pentru cei cu sitem de operare 64-bit: C:\Program Files (x86)\Notepad++\plugins\APIs
Locatia poate sa difere daca ati schimbat-o la instalare!

2016_11_08_0005.png

8. Acum intram din nou in Settings > Preferences si selectam tab-ul Auto-Completiton! Bifam tot la fel ca in imaginea de mai jos si schimbam cifra 1 cu cifra 3 (daca vrei sa vezi auto-complete instant, lasa cifra 1), apoi apasam pe Close !

2016_11_08_0008.png

9. Pentru urmatorul pas avem nevoie de un plugin numit NppExec ! Intram in Plugins > Plugin Manager > Show Plugin Manger ! Cautam NppExec si il bifam, apoi dam click pe Install ! Dupa install retartam programul !

2016_11_08_1057.png

2016_11_08_1059.png

O sa ne apara dupa un mesaj “It has not been possible to validate the integrity of “NppExec.dll” needed to install or update a plugin. Do you want to copy this file anyway (not recommended)?”. Iar noi vom apasa pe butonul “Yes”. Dupa ce am facut asta, Notepad++ va cere sa fie restart, iar noi vom apasa din nou pe “Yes”.

10. Dupa ce am instalat pluginul NppExec, trebuie sa ne hotaram unde vom tine compilatorul PAWN, deoarece toate script-urile pe care le vom creea de acum inainte, vor fi compilate folosind doar aceasta locatie! Eu am ales locatia D:\samp03\pawno\pawncc.exe . De asemenea, daca se schimba include-urile (o versiune noua de SA-MP, etc), trebuie sa inlocuiti include-urile din acest folder, NU din folder-ul unde aveti voi GM-ul.

2016_11_08_1108.png

11. Intram in Plugins > NppExec > Execute si scriem urmatoarea linie:

npp_save
cd $(CURRENT_DIRECTORY)
"D:\samp03\pawno\pawncc.exe" "$(FILE_NAME)" -; -(

D:\samp03\pawno\pawncc.exe – Schimbati cu locatia fisierului

 pawncc.exe din calculatorul dvs.

Dam apoi click pe Save si scriem PAWN Compile, apoi dam click pe Save si OK!

2016_11_08_1111.png

12. Acum intram din nou in Plugins > NppExec si bifam “No internal messages“, dupa care dam click pe Advanced Options ! Selectam la Associated script: PAWN Compile si apasam pe Add/Modify apoi pe OK ! Acum restartam din nou Notepad++

2016_11_08_1113.png
2016_11_08_1114.png

13. Dupa restart-ul programului intram in Settings > Shortcut Mapper si selectam tab-ul Plugin commands ! Cautam Pawn Compile si selectam tastele pe care apasam pentru a converti in .amx (eu am slectat Shift+F7, voi selectati dupa bunul plac !)
SFAT: Cautati PAWN Compile intre liniile 30 – 50 ! Apasam pe OK, apoi pe Close si GATA !

2016_11_08_1117.png

Sfarsit!
Speram ca ti-a placut tutorialul, daca ai intampinat probleme / dificultati nu ezita sa lasi un comentariu, pentru a primi ajutorul necesar!

8 noiembrie 2016: Auto-complete si Synthax Highlight au fost updatate pentru SA-MP 0.3z

Edited by Maurice

Tutoriale despre tot si toate: Tutoriale-Pe.NET

Link to comment
Share on other sites

A mai postat cineva un tutorial,  eu stiu ca nu ai voie sa postezi un tutorial care face acelasi lucru in fine...

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.