GTA2 ScriptPad

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

"yuck" too
yur sa'nok ngeyä
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

Thank you for reporting the bugs.

Probably i was too tired when i did some things, because i get home from work 11:00 p.m and coding at night.
And i sleep at mornings till i have to get to the work again.

Anyway, thanks again and i will start fixing them today, when i will get home.
Hopefully im not too tired and will not introduce new bugs.

Pretty lame bugs, sorry..

Btw, Cuban-Pete, what windows you use? Win 7?

And Ben you said:
"Your maps list system could be really useful."


This is for me? What maps list?
Always wear safety glasses while programming.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

he meant my map sharing page: http://gta2dare.omnitude.net/maplist/list.php

btw thanks for adding code folding for //{ and //} . it will help a lot viewing my code.

there is another less used code folding pair: //: and RETURN. i made it to make code folding possible with subs. would be nice if you could add this too.

oh and there is a general problem with code folding: it seems not to support hierarchy
yur sa'nok ngeyä
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: GTA2 ScriptPad

Post by Cuban-Pete »

Yes, I use win7 ultimate (64 bit) wit full Aero effects. :)
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

Cuban-Pete wrote:Yes, I use win7 ultimate (64 bit) wit full Aero effects. :)
Lucky you :)
At least it was running fine on such windows.Except my bugs..
I will try to fix them now.
Always wear safety glasses while programming.
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

elypter wrote:there is another less used code folding pair: //: and RETURN. i made it to make code folding possible with subs. would be nice if you could add this too.
Can you explain it more please?

Comment chars: // and then comment and then what?
What's with the punctuation mark?
elypter wrote:oh and there is a general problem with code folding: it seems not to support hierarchy
Please explain this also a bit more, a pic would help i guess.
Always wear safety glasses while programming.
User avatar
Gustavob
Immortal
Posts: 407
Joined: 18 May 2009, 21:40
GH nick: Gustavob
|Gustavob|
Location: Nowhere.
Contact:

Re: GTA2 ScriptPad

Post by Gustavob »

B-$hep wrote:
elypter wrote:there is another less used code folding pair: //: and RETURN. i made it to make code folding possible with subs. would be nice if you could add this too.
Can you explain it more please?

Comment chars: // and then comment and then what?
What's with the punctuation mark?
.
probably that:

Image
You just lost the game.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

Gustavob wrote:
B-$hep wrote:
elypter wrote:there is another less used code folding pair: //: and RETURN. i made it to make code folding possible with subs. would be nice if you could add this too.
Can you explain it more please?

Comment chars: // and then comment and then what?
What's with the punctuation mark?
.
probably that:

Image
almost.

the "//:" comes in front of that image.

that is because you could theoretically have 2 sub-jump-point destinations that share one "RETURN" so you have to use a seperate thing for that (and notepad++ wouldnt have supported "do_kf_1:")
yur sa'nok ngeyä
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

B-$hep wrote:
elypter wrote:oh and there is a general problem with code folding: it seems not to support hierarchy
Please explain this also a bit more, a pic would help i guess.
Attachments
scriptpad.jpg
yur sa'nok ngeyä
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

So if i understand you correctly, you want the (for example) all COUNTER declares folded, like with comments, IF ENDIFs etc?

Is this what you are trying to say?

If it is the thing you want, then i can say that it's already implemented, but i don't remember if it's in the uploaded version also.
Always wear safety glasses while programming.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

it should be like
Attachments
npp.jpg
yur sa'nok ngeyä
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

Ok, if you close these "-" marks, then how it looks like?

I don't want to install N++ for that, i don't use it.
Always wear safety glasses while programming.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

i cannot make an image now.

you can test it. its not really easy to show the hierarchy there anyway.
it is ready to use in jed pakx subfolder workbench http://elypter.net84.net/gta2.tk/packs.html#jedp

thats the code i displayed

Code: Select all

//{ // header
//tiny tiny town - army

//Usefull things:
//ORDER_CHAR_TO_BACKDOOR (  charname  ,  carname  )
//FOLLOW_CAR_IN_CAR
//MAKE_CHAR_DO_NOTHING
//SET_CAR_EMERG_LIGHTS
//SET_CHAR_TO_STAY_IN_CAR
//}

//{ // Declares

//{ // Players

//{ // p1
PLAYER_PED p1 = (57.5, 131.5, 255.0) 10 180
CAR_DATA p1_v

COUNTER p1_deaths = 0
COUNTER p1_incar = 0
COUNTER p1_cream = 0
COUNTER p1_indog = 0
COUNTER p1_infire = 0
COUNTER p1_lastfire=0
COUNTER p1_inmedi = 0
COUNTER p1_lastmedi=0
COUNTER p1_lastlimo=0
COUNTER p1_trg_ic=1
COUNTER p1_tmr_swat = 1
COUNTER p1_tmr_cream = 0
COUNTER p1_noburn = 0
COUNTER p1_noelectro = 0
COUNTER p1_explode_punch = 0
COUNTER p1_death_punch = 0
COUNTER p1_wantedlevel = 0
COUNTER p1_tmp_wantedlevel = 0
CHAR_DATA p1_punched
COUNTER p1_trg_punched = 0
COUNTER p1_tmr_bus = 0
COUNTER p1_tmrm_bus = 0
CHAR_DATA p1_bus_expbot
COUNTER p1_trg_horn = 0
//COUNTER p1_death_reason = 0

//gangs
COUNTER p1_gangtype = 0
CHAR_DATA p1_gangbot1
CHAR_DATA p1_gangbot2
CHAR_DATA p1_gangbot3
CHAR_DATA p1_gangbot4
CHAR_DATA p1_gangbot5
//}

//{ // p2
PLAYER_PED p2 = (73.5, 115.5, 255.0) 13 180
CAR_DATA p2_v

COUNTER p2_deaths = 0
COUNTER p2_incar = 0
COUNTER p2_cream = 0
COUNTER p2_indog = 0
COUNTER p2_infire = 0
COUNTER p2_lastfire=0
COUNTER p2_inmedi = 0
COUNTER p2_lastmedi=0
COUNTER p2_lastlimo=0
COUNTER p2_trg_ic=1
COUNTER p2_tmr_swat = 1
COUNTER p2_tmr_cream = 0
COUNTER p2_noburn = 0
COUNTER p2_noelectro = 0
COUNTER p2_explode_punch = 0
COUNTER p2_death_punch = 0
COUNTER p2_wantedlevel = 0
COUNTER p2_tmp_wantedlevel = 0
CHAR_DATA p2_punched
COUNTER p2_trg_punched = 0
COUNTER p2_tmr_bus = 0
COUNTER p2_tmrm_bus = 0
CHAR_DATA p2_bus_expbot
COUNTER p2_trg_horn = 0

//gangs
COUNTER p2_gangtype = 0
CHAR_DATA p2_gangbot1
CHAR_DATA p2_gangbot2
CHAR_DATA p2_gangbot3
CHAR_DATA p2_gangbot4
CHAR_DATA p2_gangbot5
//}

//{ // p3
PLAYER_PED p3 = (92.5, 115.5, 255.0) 7 270
CAR_DATA p3_v

COUNTER p3_deaths = 0
COUNTER p3_incar = 0
COUNTER p3_cream = 0
COUNTER p3_indog = 0
COUNTER p3_infire = 0
COUNTER p3_lastfire=0
COUNTER p3_inmedi = 0
COUNTER p3_lastmedi=0
COUNTER p3_lastlimo=0
COUNTER p3_trg_ic=1
COUNTER p3_tmr_swat = 1
COUNTER p3_tmr_cream = 0
COUNTER p3_noburn = 0
COUNTER p3_noelectro = 0
COUNTER p3_explode_punch = 0
COUNTER p3_death_punch = 0
COUNTER p3_wantedlevel = 0
COUNTER p3_tmp_wantedlevel = 0
CHAR_DATA p3_punched
COUNTER p3_trg_punched = 0
COUNTER p3_tmr_bus = 0
COUNTER p3_tmrm_bus = 0
CHAR_DATA p3_bus_expbot
COUNTER p3_trg_horn = 0

//gangs
COUNTER p3_gangtype = 0
CHAR_DATA p3_gangbot1
CHAR_DATA p3_gangbot2
CHAR_DATA p3_gangbot3
CHAR_DATA p3_gangbot4
CHAR_DATA p3_gangbot5
//}

//{ // p4
PLAYER_PED p4 = (52.0, 118.0, 255.0) 11 270
CAR_DATA p4_v

COUNTER p4_deaths = 0
COUNTER p4_incar = 0
COUNTER p4_cream = 0
COUNTER p4_indog = 0
COUNTER p4_infire = 0
COUNTER p4_lastfire=0
COUNTER p4_inmedi = 0
COUNTER p4_lastmedi=0
COUNTER p4_lastlimo=0
COUNTER p4_trg_ic=1
COUNTER p4_tmr_swat = 1
COUNTER p4_tmr_cream = 0
COUNTER p4_noburn = 0
COUNTER p4_noelectro = 0
COUNTER p4_explode_punch = 0
COUNTER p4_death_punch = 0
COUNTER p4_wantedlevel = 0
COUNTER p4_tmp_wantedlevel = 0
CHAR_DATA p4_punched
COUNTER p4_trg_punched = 0
COUNTER p4_tmr_bus = 0
COUNTER p4_tmrm_bus = 0
CHAR_DATA p4_bus_expbot
COUNTER p4_trg_horn = 0

//gangs
COUNTER p4_gangtype = 0
CHAR_DATA p4_gangbot1
CHAR_DATA p4_gangbot2
CHAR_DATA p4_gangbot3
CHAR_DATA p4_gangbot4
CHAR_DATA p4_gangbot5
//}

//{ // p5
PLAYER_PED p5 = (63.5, 115.5, 255.0) 9 180
CAR_DATA p5_v

COUNTER p5_deaths = 0
COUNTER p5_incar = 0
COUNTER p5_cream = 0
COUNTER p5_indog = 0
COUNTER p5_infire = 0
COUNTER p5_lastfire=0
COUNTER p5_inmedi = 0
COUNTER p5_lastmedi=0
COUNTER p5_lastlimo=0
COUNTER p5_trg_ic=1
COUNTER p5_tmr_swat = 1
COUNTER p5_tmr_cream = 0
COUNTER p5_noburn = 0
COUNTER p5_noelectro = 0
COUNTER p5_explode_punch = 0
COUNTER p5_death_punch = 0
COUNTER p5_wantedlevel = 0
COUNTER p5_tmp_wantedlevel = 0
CHAR_DATA p5_punched
COUNTER p5_trg_punched = 0
COUNTER p5_tmr_bus = 0
COUNTER p5_tmrm_bus = 0
CHAR_DATA p5_bus_expbot
COUNTER p5_trg_horn = 0

//gangs
COUNTER p5_gangtype = 0
CHAR_DATA p5_gangbot1
CHAR_DATA p5_gangbot2
CHAR_DATA p5_gangbot3
CHAR_DATA p5_gangbot4
CHAR_DATA p5_gangbot5
//}

//{ // p6
PLAYER_PED p6 = (76.5, 128.5, 255.0) 0 90
CAR_DATA p6_v

COUNTER p6_deaths = 0
COUNTER p6_incar = 0
COUNTER p6_cream = 0
COUNTER p6_indog = 0
COUNTER p6_infire = 0
COUNTER p6_lastfire=0
COUNTER p6_inmedi = 0
COUNTER p6_lastmedi=0
COUNTER p6_lastlimo=0
COUNTER p6_trg_ic=1
COUNTER p6_tmr_swat = 1
COUNTER p6_tmr_cream = 0
COUNTER p6_noburn = 0
COUNTER p6_noelectro = 0
COUNTER p6_explode_punch = 0
COUNTER p6_death_punch = 0
COUNTER p6_wantedlevel = 0
COUNTER p6_tmp_wantedlevel = 0
CHAR_DATA p6_punched
COUNTER p6_trg_punched = 0
COUNTER p6_tmr_bus = 0
COUNTER p6_tmrm_bus = 0
CHAR_DATA p6_bus_expbot
COUNTER p6_trg_horn = 0

//gangs
COUNTER p6_gangtype = 0
CHAR_DATA p6_gangbot1
CHAR_DATA p6_gangbot2
CHAR_DATA p6_gangbot3
CHAR_DATA p6_gangbot4
CHAR_DATA p6_gangbot5
//}

//}

//{ // Cars
//CAR_DATA carinv1 = (76.5, 122.9) 0 180 APC
CAR_DATA carinv1
CAR_DATA antenna
CAR_DATA ptank1
CAR_DATA carinv2 = (72.0, 122.5) 27 90 GUNJEEP

CAR_DATA carrok2 = (88.5, 130.5) 0 180 JEEP

CAR_DATA parkednuke = (50.5, 112.0) 0 0 KRSNABUS

 //Testcars
 /*
CAR_DATA test4 = (55.8, 128.5) 15 90 HOTDOG

CAR_DATA test6 = (55.8, 126.5) 15 90 TOWTRUCK
CAR_DATA test7 = (59.8, 128.5) 15 90 MESSER
CAR_DATA test8 = (59.8, 127.5) 15 90 ISETTA
CAR_DATA test9 = (59.8, 126.5) 15 90 GUNJEEP

//CAR_DATA test11 = (61.8, 127.5) 15 90 JEEP
CAR_DATA test12 = (61.8, 126.5) 15 90 PICKUP


CAR_DATA test15 = (61.8, 123.5) 15 90 STYPE
CAR_DATA test16 = (62.8, 128.5) 15 90 RTYPE

//CAR_DATA test18 = (62.8, 127.5) 15 90 ZCX5 ZCX5
CAR_DATA test19 = (67.8, 129.5) 15 280 TOWTRUCK
CAR_DATA test20 = (67.8, 131.5) 15 250 VAN
//CAR_DATA test21 = (65.8, 131.5) 15 90 VAN

CAR_DATA test6 = (55.5, 127.5) 15 90 TRUKCAB1
CAR_DATA test14 = (61.8, 124.5) 15 90 BANKVAN
CAR_DATA test16 = (61.5, 129.5) 15 90 JEFFREY
CAR_DATA test13 = (61.8, 125.5) 15 90 MONSTER
*/
//CAR_DATA test13 = (61.8, 125.5) 15 90 EDSELFBI


CAR_DATA test19 = (61.6, 108.8) -1 0 DART
CAR_DATA test22 = (77.0, 116.1) 30 45 MORGAN

//DELETED// CAR_DATA test3 = (61.5, 108.8) 15 0 ICECREAM
CAR_DATA test5 = (72.0, 118.1) 15 280 TANKER
CAR_DATA test17 = (75.0, 118.1) 15 80 TRUKTRNS
CAR_DATA test10 = (69.5, 122.0) 1 0 LIMO2

CAR_DATA test21 = (94.0, 115.2) 7 80 GTRUCK
CAR_DATA test2 = (55.9, 117.5) 15 285 MEDICAR
CAR_DATA test11 = (56.5, 130.5) 12 180 BUS
CAR_DATA test1 = (72.5, 123.4) 15 90 FIRETRUK
//}

//{ // ARMY BOTS
FORWARD apcbots:
DESTRUCTOR apcdes
CHAR_DATA apcbot1
CHAR_DATA apcbot2
CAR_DATA botapc
FORWARD nukebots:
DESTRUCTOR nukedes
CHAR_DATA nukebot1
CAR_DATA botnuke
//}

//{ // TANKER
	FORWARD tanker1:
	DESTRUCTOR tanker1des
	CHAR_DATA tanker1bot
	CHAR_DATA tanker1expbot
	CAR_DATA tanker1cab
	CAR_DATA tanker1trailer
	CAR_DATA tanker1expcar

	CAR_DATA tanker1covcar

	COUNTER create_tanker1=1
	COUNTER tanker1_exp_trg = 0
//}

//{ // DOORS
	DECLARE_DOOR_INFO ( 32 , 35 , 2 )
	DOOR_DATA door_1 = SINGLE (62, 130, 1) (65.0, 130.5, 1.0, 2.0, 1.0) RIGHT 0 ANY_PLAYER CLOSE_WHEN_OPEN_RULE_FAILS 0 FLIP_RIGHT NOT_REVERSED
//}

//{ // Collectibles
GENERATOR coctail1 = (70.5, 124.5) 0 COLLECT_04 3000 3000 99
GENERATOR rocket2 = (60.0, 122.0) 0 COLLECT_02 3000 3000 10
GENERATOR coctail2 = (62.5, 131.5, 3.0) 270 COLLECT_04 3000 3000 99
GENERATOR rocket = (93.5, 129.5) 0 COLLECT_02 3000 3000 10
GENERATOR doubled = (53.0, 115.5) 0 MOVING_COLLECT_35 3000 3000 1
GENERATOR fast = (58.0, 117.5) 0 MOVING_COLLECT_36 3000 3000 1
GENERATOR grenade = (81.5, 125.5) 0 COLLECT_05 3000 3000 99
GENERATOR electro = (80.5, 108.5) 0 COLLECT_03 3000 3000 2
GENERATOR flamer = (56.5, 125.0) 0 COLLECT_08 3000 3000 99
GENERATOR coctail3 = (49.5, 116.0) 0 COLLECT_04 3000 3000 99
GENERATOR oil = (56.0, 117.5) 0 COLLECT_16 3000 3000 5
GENERATOR mines = (66.5, 120.5) 0 COLLECT_17 3000 3000 10
GENERATOR vmg = (95.5, 119.5) 0 COLLECT_18 3000 3000 10
GENERATOR fingers = (75.5, 124.5) 0 MOVING_COLLECT_37 3000 3000 1
GENERATOR bomb = (58.5, 123.5) 0 MOVING_COLLECT_15 3000 3000 1
GENERATOR bribe = (60.5, 108.5, 2.4) 0 MOVING_COLLECT_33 3000 3000 1

GENERATOR amour = (84.5, 116.5, 2.0) 0 COLLECT_31 0 0 1
GENERATOR health1 = (76.5, 124.5) 0 MOVING_COLLECT_30 0 0 1
GENERATOR health2 = (57.5, 115.5) 0 MOVING_COLLECT_30 0 0 1

GENERATOR xmg0 = (84.5, 117.5, 2.0) 0 COLLECT_01 0 0 99
GENERATOR xmg1 = (57.5, 129.5) 0 MOVING_COLLECT_01 0 0 99
GENERATOR xmg2 = (66.5, 128.5) 0 MOVING_COLLECT_01 0 0 99
GENERATOR xmg3 = (78.5, 128.5) 0 MOVING_COLLECT_01 0 0 99
GENERATOR xmg4 = (51.0, 118.5) 0 MOVING_COLLECT_01 0 0 99
GENERATOR xmg5 = (64.5, 114.5) 0 MOVING_COLLECT_01 0 0 99
GENERATOR xmg6 = (73.0, 114.5) 0 MOVING_COLLECT_01 0 0 99
GENERATOR xmg7 = (90.5, 115.5) 0 MOVING_COLLECT_01 0 0 99
GENERATOR xmg8 = (89.5, 125.5) 0 MOVING_COLLECT_01 0 0 99

GENERATOR xamour1 = (57.5, 130.5) 0 COLLECT_31 0 0 1
GENERATOR xamour2 = (67.5, 128.5, 2.3) 0 COLLECT_31 0 0 1
GENERATOR xamour3 = (77.5, 128.5) 0 COLLECT_31 0 0 1
GENERATOR xamour4 = (51.0, 117.5) 0 COLLECT_31 0 0 1
GENERATOR xamour5 = (62.5, 114.5) 0 COLLECT_31 0 0 1
GENERATOR xamour6 = (74.0, 114.5) 0 COLLECT_31 0 0 1
GENERATOR xamour7 = (91.5, 115.5) 0 COLLECT_31 0 0 1
GENERATOR xamour8 = (90.5, 125.5) 0 COLLECT_31 0 0 1

GENERATOR xcoctail1 = (54.5, 118.5) 0 COLLECT_04 3000 3000 5
GENERATOR xcoctail2 = (63.5, 126.5, 2.0) 0 COLLECT_04 3000 3000 5
GENERATOR xcoctail3 = (78.5, 118.5) 0 COLLECT_04 3000 3000 5
GENERATOR xcoctail4 = (61.5, 108.5) 0 COLLECT_04 3000 3000 5
GENERATOR xcoctail5 = (62.5, 117.5) 0 COLLECT_04 3000 3000 5
GENERATOR xcoctail6 = (73.5, 131.5) 0 COLLECT_04 3000 3000 5
GENERATOR xcoctail7 = (87.5, 122.5) 0 COLLECT_04 3000 3000 5

GENERATOR xflamer1 = (51.5, 111.5) 0 COLLECT_08 3000 3000 5
GENERATOR xflamer2 = (73.5, 128.5) 0 COLLECT_08 3000 3000 5
GENERATOR xflamer3 = (90.5, 111.5) 0 COLLECT_08 3000 3000 5
GENERATOR xflamer4 = (97.5, 121.5) 0 COLLECT_08 3000 3000 5
GENERATOR xflamer5 = (64.5, 117.4) 0 COLLECT_08 3000 3000 5
GENERATOR xflamer6 = (51.5, 129.5) 0 COLLECT_08 3000 3000 5
//}

//{ // static objects
OBJ_DATA del_mine
OBJ_DATA del_oil
OBJ_DATA tower1 = (55.2, 114.8, 2.6) 0 TOWER
OBJ_DATA tower2 = (55.4, 114.8, 2.6) 0 TOWER
OBJ_DATA tower3 = (55.7, 114.8, 2.6) 0 TOWER
OBJ_DATA tower4 = (56.0, 114.8, 2.6) 0 TOWER
OBJ_DATA tower5 = (56.3, 114.8, 2.6) 0 TOWER
OBJ_DATA tower6 = (56.6, 114.8, 2.6) 0 TOWER
OBJ_DATA tower7 = (56.9, 114.8, 2.6) 0 TOWER
OBJ_DATA tower8 = (57.2, 114.8, 2.6) 0 TOWER
OBJ_DATA tower9 = (57.5, 114.8, 2.6) 0 TOWER
OBJ_DATA tower10 = (57.8, 114.8, 2.6) 0 TOWER
OBJ_DATA tower11 = (58.1, 114.8, 2.6) 0 TOWER
OBJ_DATA tower12 = (58.4, 114.8, 2.6) 0 TOWER
OBJ_DATA tower13 = (58.7, 114.8, 2.6) 0 TOWER
OBJ_DATA tower14 = (59.0, 114.8, 2.6) 0 TOWER

OBJ_DATA towerb1 = (55.2, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb2 = (55.4, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb3 = (55.7, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb4 = (56.0, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb5 = (56.3, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb6 = (56.6, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb7 = (56.9, 114.8, 3.6) 0 TOWER
//DELETED// OBJ_DATA towerb8 = (57.2, 114.8, 3.6) 0 TOWER
//DELETED// OBJ_DATA towerb9 = (57.5, 114.8, 3.6) 0 TOWER
//DELETED// OBJ_DATA towerb10 = (57.8, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb11 = (58.1, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb12 = (58.4, 114.8, 3.6) 0 TOWER
OBJ_DATA towerb13 = (58.7, 114.8, 3.6) 0 TOWER
//DELETED// OBJ_DATA towerb14 = (59.0, 114.8, 3.6) 0 TOWER

OBJ_DATA towera1 = (86.5, 121.5, 5.1) 0 TOWER
OBJ_DATA towera2 = (83.5, 115.5, 5.1) 0 TOWER
OBJ_DATA towera3 = (85.5, 115.5, 5.1) 0 TOWER


//}

//{ // SUPERTANK

/*
OBJ_DATA itarget_2 = (107.0, 95.0, 1.0) 0 INVISIBLE_TARGET
OBJ_DATA itarget_3 = (72.0, 95.0) 0 INVISIBLE_TARGET
OBJ_DATA itarget_4 = (44.0, 95.0) 0 INVISIBLE_TARGET
OBJ_DATA itarget_5 = (44.0, 119.5) 0 INVISIBLE_TARGET
OBJ_DATA itarget_6 = (44.0, 136.9) 0 INVISIBLE_TARGET
OBJ_DATA itarget_7 = (69.0, 137.0, 5.0) 0 INVISIBLE_TARGET
OBJ_DATA itarget_10 = (107.0, 137.0, 5.0) 0 INVISIBLE_TARGET
OBJ_DATA itarget_11 = (107.0, 122.0, 5.0) 0 INVISIBLE_TARGET

PARKED_CAR_DATA trailer = (65.8, 119.2) 19 270 APC
PARKED_CAR_DATA tank1 = (67.5, 118.5) 19 0 TANK
PARKED_CAR_DATA tank2 = (67.5, 118.5) 19 0 TANK
PARKED_CAR_DATA tank3 = (67.5, 118.5) 19 0 TANK
PARKED_CAR_DATA tank4 = (67.5, 118.5) 19 0 TANK
PARKED_CAR_DATA tank5 = (67.5, 118.5) 19 0 TANK
PARKED_CAR_DATA tank6 = (67.5, 118.5) 19 0 TANK
PARKED_CAR_DATA tank7 = (67.5, 118.5) 19 0 TANK
PARKED_CAR_DATA tank8 = (67.5, 118.5) 19 0 TANK

PARKED_CAR_DATA jeep9 = (75.0, 118.5) 19 0 GUNJEEP
PARKED_CAR_DATA jeep10 = (76.5, 118.5) 19 0 GUNJEEP
PARKED_CAR_DATA jeep11 = (78.0, 118.5) 19 0 GUNJEEP

CHAR_DATA stankbot0
CHAR_DATA stankbot1
CHAR_DATA stankbot2
CHAR_DATA stankbot3
CHAR_DATA stankbot4
CHAR_DATA stankbot5
CHAR_DATA stankbot6
CHAR_DATA stankbot7
CHAR_DATA stankbot8

CHAR_DATA stankbot9
CHAR_DATA stankbot10
CHAR_DATA stankbot11
CHAR_DATA ped

COUNTER subloop = 1
COUNTER peds
COUNTER loadtank = 1

COUNTER stshoot = 0

FORWARD supertank:
*/
//}

//{ // Counter
COUNTER mainloop = 1
COUNTER loop = 1
COUNTER tmr =0
COUNTER tmr2 = 0

COUNTER wantedcounter = 40
COUNTER wantedlevel = 0
COUNTER wantedlevel6 = 1
COUNTER wantedlevel7 = 1
COUNTER wantedlevel8 = 1

ONSCREEN_COUNTER wantedlevel_screen
ONSCREEN_COUNTER dummy_osc

COUNTER  tmr_nocol = 1
COUNTER  col_nocol = 0
OBJ_DATA obj_nocol

COUNTER  tmr_repair = 1
COUNTER  col_repair = 0
OBJ_DATA obj_repair

COUNTER  tmr_abribe = 1
COUNTER  col_abribe = 0
OBJ_DATA obj_abribe
SOUND snd_abribe

COUNTER  tmr_expunch = 1
COUNTER  col_expunch = 0
OBJ_DATA obj_expunch

/*
COUNTER death_reason = 0
COUNTER death_counter = 0
COUNTER msg = 0
COUNTER temp = 0
*/
//}

//{ // DECLARE Commands
DECLARE_POLICELEVEL (6)
//SET_GANG_INFO ( tanker  , 12 , molotov , molotov , molotov , 5 , 60.5 , 109.5 , 2.0 , 1 , TRUKCAB1 , 1 )

// MAP ZONE INFO #################################################produces crash after quitting the game
//MAP_ZONE area = ( 1000 , 800 , 0 , 100 , 1000 , 15 , 15 , 600 , 0 , 100 , 0)
//                CD     GCD   BCD PCR PD     MR   CTR  ER    GCR PPR  GCARR
// ( CD:cardensity , GCD:good car ratio , BCD:bad car ratio , PCR:police car ratio , PD:ped density , MR:mugger ratio , CTR:car thief ratio , ER:elvis ratio , GCR:gang char ratio , PPR:police ped ratio , GCARR:gang character ratio)

CAR_DATA garbage

//}

//}

LEVELSTART // to LEVELEND

//{ // SETUP Commands

SET_GANG_INFO (gng0, 1, MACHINE_GUN, ROCKET_LAUNCHER, ROCKET_LAUNCHER, 5, 0.0, 0.0, 0.0, 0, APC, 30)
SET_GANG_INFO (gng4, 1, MACHINE_GUN, ROCKET_LAUNCHER, ROCKET_LAUNCHER, 4, 0.0, 0.0, 0.0, 0, TANK, 30)


MAKE_DOOR_MANUAL  ( door_1 )
OPEN_DOOR ( door_1 )

SET_AMBIENT_LEVEL (0.7, 0)

GIVE_WEAPON (parkednuke , CAR_BOMB_INSTANT  )

ADD_ONSCREEN_COUNTER  (   dummy_osc  ,  p1_tmr_bus )

carinv1 = CREATE_GANG_CAR (76.3, 123.0) 0 180 APC END
ptank1 = CREATE_GANG_CAR (87.3, 130.5) 2 270 TANK END
GIVE_WEAPON (ptank1 , TANK_GUN , 99  )
GIVE_WEAPON (ptank1 , TANK_GUN , 99  )

//antenna = CREATE_CAR (75.5, 122.9) 0 180 APC END //MINI_CAR END
SET_CAR_NO_COLLIDE ( carinv1 )
SET_CAR_BULLETPROOF  (  carinv1   ,  ON  )
//SET_CAR_ROCKETPROOF  (  carinv1   ,  ON  )
GIVE_WEAPON (carinv1 , CAR_MINE    )
GIVE_WEAPON (carinv1 , CAR_MACHINE_GUN  )
//PUT_CAR_ON_TRAILER (antenna,carinv1)

//}

LAUNCH_MISSION (load.mis)

//{ // TANKER
	//GOSUB tanker1:
//}

//{ // SUPERTANK
	//GOSUB supertank:
//}

LEVELEND

//{ // SUBS

//{ // TANKER

//: //tanker1
tanker1:
	//tanker1des = CREATE_DESTRUCTOR (78.5, 119.5) (3.0, 3.0) END
	DELAY_HERE (50)
	DELETE_ITEM ( tanker1des )

	DELETE_ITEM (tanker1expbot)
	DELETE_ITEM (tanker1expcar)
	DELETE_ITEM ( tanker1cab )
	DELETE_ITEM  ( tanker1bot )
	DELETE_ITEM ( tanker1trailer )

	DELAY_HERE (50)

	//The Truck and trailer must be in sight of player or they will be spawned incorrectly

	tanker1cab = CREATE_CAR (61.5, 131.5, 2.0) 15 90 TRUKCAB1 END
	tanker1trailer = CREATE_CAR (61.0, 131.5, 2.0) 15 90 TANKER END

	GIVE_WEAPON ( tanker1cab , CAR_MINE )
	GIVE_WEAPON ( tanker1cab , CAR_BOMB )
	tanker1bot = CREATE_CHAR_INSIDE_CAR ( tanker1cab ) 33 DRIVER END

	MAKE_CAR_DRIVE_AWAY ( tanker1cab )
RETURN

//}

//{ // Army bots

//: // apcbots
apcbots:
	apcdes = CREATE_DESTRUCTOR (79.0, 113.0) (3.0, 3.0) END
	DELAY (100)
	DELETE_ITEM ( apcdes )

	DELETE_ITEM ( botapc )
	botapc = CREATE_CAR (79.0, 113.5) 15 90 APC END
	GIVE_WEAPON ( botapc , CAR_MACHINE_GUN )
	SET_CAR_BULLETPROOF  (  botapc   ,  ON  )

	DELETE_ITEM  ( apcbot1 )
	apcbot1 = CREATE_CHAR_INSIDE_CAR ( botapc ) 4 POLICE END //ARMY
	//SET_CHAR_OBJECTIVE ( apcbot1 , ENTER_CAR_AS_DRIVER , botapc )
	SET_CHAR_SHOOTING_SKILL ( apcbot1 , CRACK_SHOT )
	SET_CHAR_THREAT_SEARCH ( apcbot1 , AREA )
	SET_CHAR_THREAT_REACTION ( apcbot1 , REACT_AS_NORMAL )
	//SET_CHAR_OBJECTIVE ( apcbot1 , KILL_CHAR_ANY_MEANS , p1 )
	SET_CHAR_TO_USE_CAR_WEAPON ( apcbot1 , ON )
	SET_FAVOURITE_MODEL ( apcbot1, APC )
	SET_CHAR_DRIVE_AGGRESSION ( apcbot1  ,  ON  )

	//Replacement for unstable code
	GIVE_WEAPON ( apcbot1 , FLAME_THROWER )
	//ADD_GROUP_TO_CHARACTER ( apcbot1 , 4 )
	//MAKE_NEW_LEADER_OF_GROUP  ( apcbot1  ,  apcbot1 )


	//maybe there is a bug in it that causes random crashes
	/*
	ADD_GROUP_TO_CHARACTER ( apcbot1 , 4 )
	SET_CHAR_OBJECTIVE ( apcbot1 , ENTER_CAR_AS_DRIVER , botapc )
	MAKE_NEW_LEADER_OF_GROUP  ( apcbot1  ,  apcbot1 )
	GIVE_WEAPON ( apcbot1 , ROCKET_LAUNCHER )
	ADD_GROUP_TO_CHARACTER ( apcbot1 , 4 )
	SET_CHAR_OBJECTIVE ( apcbot1 , ENTER_CAR_AS_DRIVER , botapc )
	GIVE_WEAPON ( apcbot1 , FLAME_THROWER )
	ADD_GROUP_TO_CHARACTER ( apcbot1 , 4 )
	SET_CHAR_OBJECTIVE ( apcbot1 , ENTER_CAR_AS_DRIVER , botapc )
	MAKE_NEW_LEADER_OF_GROUP  ( apcbot1  ,  apcbot1 )
	*/

RETURN

//: // nukebot
nukebots:
	nukedes = CREATE_DESTRUCTOR (82.5, 122.0) (4.0, 4.0) END
	DELAY_HERE(50)
	DELETE_ITEM (nukedes)

	DELETE_ITEM (botnuke)
	botnuke = CREATE_CAR (82.5, 123.5) 15 270 KRSNABUS END
	GIVE_WEAPON ( botnuke , CAR_BOMB_INSTANT )

	DELETE_ITEM  ( nukebot1 )
	nukebot1 = CREATE_CHAR_INSIDE_CAR ( botnuke ) 4 ARMY END
	SET_CHAR_TO_STAY_IN_CAR ( nukebot1 , ON )
	SET_CHAR_OBJECTIVE ( nukebot1 , ENTER_CAR_AS_DRIVER , botnuke )
	SET_CHAR_SHOOTING_SKILL ( nukebot1 , CRACK_SHOT )
	SET_CHAR_THREAT_SEARCH ( nukebot1 , AREA )
	SET_CHAR_THREAT_REACTION ( nukebot1 , REACT_AS_NORMAL )
	SET_CHAR_OBJECTIVE ( nukebot1 , KILL_CHAR_ANY_MEANS , p1 )
	SET_CHAR_TO_USE_CAR_WEAPON ( nukebot1 , ON )
	SET_FAVOURITE_MODEL ( nukebot1, KRSNABUS )
	SET_CHAR_DRIVE_AGGRESSION ( nukebot1  ,  ON  )

RETURN

//}

//: // supertank
/*
supertank:

SET_CAR_ROCKETPROOF ( tank1, ON )
SET_CAR_ROCKETPROOF ( tank2, ON )
SET_CAR_ROCKETPROOF ( tank3, ON )
SET_CAR_ROCKETPROOF ( tank4, ON )
SET_CAR_ROCKETPROOF ( tank5, ON )
SET_CAR_ROCKETPROOF ( tank6, ON )
SET_CAR_ROCKETPROOF ( tank7, ON )
SET_CAR_ROCKETPROOF ( tank8, ON )

SET_CAR_ROCKETPROOF ( jeep9, ON )
SET_CAR_ROCKETPROOF ( jeep10, ON )
SET_CAR_ROCKETPROOF ( jeep11, ON )

SET_CAR_BULLETPROOF ( jeep9, ON )
SET_CAR_BULLETPROOF ( jeep10, ON )
SET_CAR_BULLETPROOF ( jeep11, ON )

SET_CAR_ROCKETPROOF ( trailer, ON )
SET_CAR_BULLETPROOF ( trailer, ON )
//SET_CAR_FLAMEPROOF ( trailer, ON )

GIVE_WEAPON ( trailer , car_machine_gun )

stankbot2 = CREATE_CHAR_INSIDE_CAR ( tank2 ) 8 tank_driver END
stankbot3 = CREATE_CHAR_INSIDE_CAR ( tank3 ) 8 tank_driver END
stankbot4 = CREATE_CHAR_INSIDE_CAR ( tank4 ) 8 tank_driver END
stankbot5 = CREATE_CHAR_INSIDE_CAR ( tank5 ) 8 tank_driver END
stankbot6 = CREATE_CHAR_INSIDE_CAR ( tank6 ) 8 tank_driver END
stankbot7 = CREATE_CHAR_INSIDE_CAR ( tank7 ) 8 tank_driver END
stankbot8 = CREATE_CHAR_INSIDE_CAR ( tank8 ) 8 tank_driver END

stankbot9 = CREATE_CHAR_INSIDE_CAR ( jeep9 ) 8 CRIMINAL_TYPE2 END
stankbot10 = CREATE_CHAR_INSIDE_CAR ( jeep10 ) 8 CRIMINAL_TYPE2 END
stankbot11 = CREATE_CHAR_INSIDE_CAR ( jeep11 ) 8 CRIMINAL_TYPE2 END

PUT_CAR_ON_TRAILER ( tank1 , trailer )
PUT_CAR_ON_TRAILER ( tank2 , trailer )
PUT_CAR_ON_TRAILER ( tank3 , trailer )
PUT_CAR_ON_TRAILER ( tank4 , trailer )
PUT_CAR_ON_TRAILER ( tank5 , trailer )
PUT_CAR_ON_TRAILER ( tank6 , trailer )
PUT_CAR_ON_TRAILER ( tank7 , trailer )
PUT_CAR_ON_TRAILER ( tank8 , trailer )

PUT_CAR_ON_TRAILER ( jeep9 , trailer )
PUT_CAR_ON_TRAILER ( jeep10 , trailer )
PUT_CAR_ON_TRAILER ( jeep11 , trailer )

RETURN
*/
//}

//}
yur sa'nok ngeyä
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

You can use the ScriptPad "core" keywords:

Code: Select all

Region your_region_name

Code: Select all

EndRegion
for doing exactly that. And as i said, it's already built in.
Case doesn't matter.

But it's not implemented in the version i uploaded here.


So for example with your code it will look like this:

Code: Select all

Region header
//tiny tiny town - army

//Usefull things:
//ORDER_CHAR_TO_BACKDOOR (  charname  ,  carname  )
//FOLLOW_CAR_IN_CAR
//MAKE_CHAR_DO_NOTHING
//SET_CAR_EMERG_LIGHTS
//SET_CHAR_TO_STAY_IN_CAR
EndRegion
If you really want, i will try to make it work with your "//{" and "//}" chars.
And when i upload the newer version, and you want to try these keywords (region, endregion), then you can just hit Ctrl+R in ScriptPad and let him to replace all your //{ and //} chars with region, endregion keywords and your code should look exactly like that on pic.
Ok, almost.


You may even remove the // before the commands with regular expressions if you want.

For example, if you replace the:

Code: Select all

//{ // header
with

Code: Select all

region // header
and if you fold that then it will look like:

Code: Select all

[+] // header
But i think it will look nicer like this:

Code: Select all

[+] header
Always wear safety glasses while programming.
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 ScriptPad

Post by T.M. »

B-$hep wrote:For example, if you replace the:

Code: Select all

//{ // header
with

Code: Select all

region // header
it wont compile if its not commented out.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

you could also just use { and } instead of //{ and //} .The compiler ignores them but i didnt know when i started using it. this would even theoretically be compatible with the template markup.
Last edited by elypter on 29 Apr 2011, 11:41, edited 1 time in total.
yur sa'nok ngeyä
User avatar
T.M.
Immortal
Posts: 960
Joined: 29 Jan 2010, 15:00
Location: F21B3EED

Re: GTA2 ScriptPad

Post by T.M. »

I would prefer just { looks cleaner / easier to write, and has less confusion too (people might delete those commented { lines...)
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

It seems that i can't get them ({ and }) to work.

EDIT Elypter
I don't understand how you found that miss2 ignores the curly brackets?
When you use them anywhere you want, it will just stops compiling for me and gives up.

For example i tried this in ScriptPad:

Code: Select all

{ //jj
//ghj
}

levelstart

levelend
Compilation stopped.
And everything is 0, in compiler output.


I think i will try to continue using Region, EndRegion.

And will just use the hack for miss2 for: Region, EndRegion commands, because he doesn't know them.
Pretty ugly way, but will see.
Always wear safety glasses while programming.
User avatar
elypter
Immortal
Posts: 1119
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA2 ScriptPad

Post by elypter »

oh, i don't remember. i think TM told me and i tested it but now i cannot get it working too.
yur sa'nok ngeyä
User avatar
B-$hep
Immortal
Posts: 584
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: GTA2 ScriptPad

Post by B-$hep »

Ok, but i will still try //{ and //}
Always wear safety glasses while programming.
Post Reply