[Tutorial] PAWN Syntax and Compiler for Visual Studio Code
#27

Quote:
Originally Posted by FreAkeD
View Post
Very nice stuff, @CXdur.

I'll be working on updating the tutorial for much better readability and add some useful snippets into it too.
I created a quick java program to generate snippets for me so that I could easily add some snippets for my gamemode's functions. Here is a pastebin link if anyone is interested:

https://pastebin.com/p7n6uH2H

It should be pretty simple to use, just put it in a folder and create a .txt file called "resources.txt", you can see a sample below. You will need to compile the file and launch it (javac filename & java filename, might need to use the filepaths to javac.exe/java.exe if you don't have the environment variables set up). Alternatively, you can install the Code Runner extension for VScode which is far more simple.

Example resources.txt
Code:
ApplyEventVehicleSettings(playerid, vehicle)
ApplyEventVehicleEnter(playerid, vehicle)
SendHostMessageToEventMembers(event, text[])
AddGroupDrugDepot(const groupId, const dbId, Float:x, Float:y, Float:z, interior, world, drugAmount = 7500, playerLimit = 150, rank = 1, drugbag = false)
IsNearbyGroupWeaponRack(const playerid, const wepRack)
And this is the output.json after running the program:
Code:
"ApplyEventVehicleSettings": {
	"prefix": "ApplyEventVehicleSettings",
	"body": "ApplyEventVehicleSettings(${1:playerid}, ${2: vehicle})$0"
},
"ApplyEventVehicleEnter": {
	"prefix": "ApplyEventVehicleEnter",
	"body": "ApplyEventVehicleEnter(${1:playerid}, ${2: vehicle})$0"
},
"SendHostMessageToEventMembers": {
	"prefix": "SendHostMessageToEventMembers",
	"body": "SendHostMessageToEventMembers(${1:event}, ${2: text[]})$0"
},
"AddGroupDrugDepot": {
	"prefix": "AddGroupDrugDepot",
	"body": "AddGroupDrugDepot(${1:const groupId}, ${2: const dbId}, ${3: Float:x}, ${4: Float:y}, ${5: Float:z}, ${6: interior}, ${7: world}, ${8: drugAmount = 7500}, ${9: playerLimit = 150}, ${10: rank = 1}, ${11: drugbag = false})$0"
},
"IsNearbyGroupWeaponRack": {
	"prefix": "IsNearbyGroupWeaponRack",
	"body": "IsNearbyGroupWeaponRack(${1:const playerid}, ${2: const wepRack})$0"
},
Reply


Messages In This Thread
PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 27.07.2017, 09:44
Re: PAWN Syntax and Compiler for Visual Studio Code - by JasonRiggs - 27.07.2017, 09:47
Respuesta: PAWN Syntax and Compiler for Visual Studio Code - by Whyd - 27.07.2017, 09:56
Re: PAWN Syntax and Compiler for Visual Studio Code - by CodeStyle175 - 27.07.2017, 09:57
Re: PAWN Syntax and Compiler for Visual Studio Code - by Hansrutger - 27.07.2017, 10:20
Re: PAWN Syntax and Compiler for Visual Studio Code - by R4nd4ll - 27.07.2017, 10:27
Re: PAWN Syntax and Compiler for Visual Studio Code - by Eoussama - 27.07.2017, 10:28
Re: PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 27.07.2017, 10:36
Re: PAWN Syntax and Compiler for Visual Studio Code - by Henson - 08.08.2017, 14:29
Re: PAWN Syntax and Compiler for Visual Studio Code - by Chaser98 - 11.08.2017, 22:54
Re: PAWN Syntax and Compiler for Visual Studio Code - by Eoussama - 12.08.2017, 00:47
Re: PAWN Syntax and Compiler for Visual Studio Code - by ISmokezU - 12.08.2017, 02:54
Re: PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 12.08.2017, 03:18
Re: PAWN Syntax and Compiler for Visual Studio Code - by HoussemGaming - 12.08.2017, 15:57
Re: PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 12.08.2017, 16:21
Re: PAWN Syntax and Compiler for Visual Studio Code - by iKarim - 13.08.2017, 15:12
Re: PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 13.08.2017, 23:19
Re: PAWN Syntax and Compiler for Visual Studio Code - by 10MIN - 14.08.2017, 12:26
Re: PAWN Syntax and Compiler for Visual Studio Code - by Misiur - 14.08.2017, 12:50
Re: PAWN Syntax and Compiler for Visual Studio Code - by 10MIN - 14.08.2017, 14:25
Re: PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 06.10.2017, 04:39
Re: PAWN Syntax and Compiler for Visual Studio Code - by OneDay - 06.10.2017, 11:44
Re: PAWN Syntax and Compiler for Visual Studio Code - by friderik - 06.10.2017, 13:27
Re: PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 06.10.2017, 13:49
Re: PAWN Syntax and Compiler for Visual Studio Code - by friderik - 06.10.2017, 16:18
Re: PAWN Syntax and Compiler for Visual Studio Code - by FreAkeD - 01.11.2017, 09:24
Re: PAWN Syntax and Compiler for Visual Studio Code - by CXdur - 01.11.2017, 12:51
Re: PAWN Syntax and Compiler for Visual Studio Code - by Banditul18 - 01.11.2017, 17:31
Re: PAWN Syntax and Compiler for Visual Studio Code - by 10MIN - 01.11.2017, 19:49
Re: PAWN Syntax and Compiler for Visual Studio Code - by Banditul18 - 01.11.2017, 21:02
Re: PAWN Syntax and Compiler for Visual Studio Code - by teto27 - 10.11.2017, 21:34
Re: PAWN Syntax and Compiler for Visual Studio Code - by PaulDinam - 11.11.2017, 22:53
Re: PAWN Syntax and Compiler for Visual Studio Code - by Manyula - 25.12.2017, 22:50
Re: PAWN Syntax and Compiler for Visual Studio Code - by sheenidgs - 26.12.2017, 03:47
Re: PAWN Syntax and Compiler for Visual Studio Code - by Daniielk - 26.12.2017, 17:59
Re: PAWN Syntax and Compiler for Visual Studio Code - by Banditul18 - 26.12.2017, 18:31
Re: PAWN Syntax and Compiler for Visual Studio Code - by Daniielk - 26.12.2017, 19:15
Re: PAWN Syntax and Compiler for Visual Studio Code - by Manyula - 27.12.2017, 13:11
Re: PAWN Syntax and Compiler for Visual Studio Code - by Barnwell - 27.12.2017, 23:50
Re: PAWN Syntax and Compiler for Visual Studio Code - by Tween73 - 29.12.2017, 02:07
Re: PAWN Syntax and Compiler for Visual Studio Code - by VincenzoDrift - 31.12.2017, 12:52
Re: PAWN Syntax and Compiler for Visual Studio Code - by VincenzoDrift - 01.01.2018, 08:27
Re: PAWN Syntax and Compiler for Visual Studio Code - by YamatoYamm - 30.03.2018, 20:23
Re: PAWN Syntax and Compiler for Visual Studio Code - by Scriptery - 22.04.2018, 22:31
Re: PAWN Syntax and Compiler for Visual Studio Code - by Jay_Dixon - 26.07.2018, 21:40
Re: PAWN Syntax and Compiler for Visual Studio Code - by Heress - 28.07.2018, 16:55
Re: PAWN Syntax and Compiler for Visual Studio Code - by Jay_Dixon - 29.07.2018, 20:38
Re: PAWN Syntax and Compiler for Visual Studio Code - by [BOPE]Seu._.Madruga - 01.08.2018, 03:12
Re: PAWN Syntax and Compiler for Visual Studio Code - by [BOPE]Seu._.Madruga - 02.08.2018, 02:44
Re: PAWN Syntax and Compiler for Visual Studio Code - by [BOPE]Seu._.Madruga - 06.08.2018, 15:25
Re: PAWN Syntax and Compiler for Visual Studio Code - by Viz - 12.08.2018, 06:21
Re: PAWN Syntax and Compiler for Visual Studio Code - by JaskaranSingh - 29.12.2018, 09:29
Re: PAWN Syntax and Compiler for Visual Studio Code - by 1136382040 - 23.02.2019, 00:46
Re: PAWN Syntax and Compiler for Visual Studio Code - by CONTROLA - 24.02.2019, 08:29
Re: PAWN Syntax and Compiler for Visual Studio Code - by polygxn - 24.02.2019, 09:58
Re: PAWN Syntax and Compiler for Visual Studio Code - by CONTROLA - 03.03.2019, 12:07

Forum Jump:


Users browsing this thread: 3 Guest(s)