Pyro wrote:
Player passengers in cars...Code:
STORE_CAR_CHARACTER_IS_IN ( p1 , p1_current_car )
IF ( ( CHECK_CHAR_CURR_WEAPON ( p2 , ELECTRO_BATON ) )
AND ( IS_CHAR_PRESSING_HORN ( p1 ) ) )
SET_CHAR_OBJECTIVE ( p2 , ENTER_CAR_AS_PASSENGER , p1_current_car )
ENDIF
Nice one! I didnt know SET_CHAR_OBJECTIVE worked with players. I actually thought about trying but never tried, I forgot doing so

Nice one again.
EDIT: Tried to compile, but it crashes the official compiler and gta2_mispadvike.exe compiler freezes at "Checking Compiler Output". Probably because of the set_objective to player thing :I
Still, here's the script:
Code:
PLAYER_PED player1 = ( 52.5 , 179.5 , 2.0 ) -1 270
PLAYER_PED player2 = ( 52.5 , 179.5 , 2.0 ) -1 270
counter loop = 1
CAR_DATA p1_current_car
CAR_DATA p2_current_car
LEVELSTART
IF ( CHECK_CHARACTER_HEALTH ( player1 , 0 ) )
SET_CHAR_GRAPHIC_TYPE ( player1 , DUMMY_GRAPHIC , -1 )
ENDIF
IF (CHECK_CHARACTER_HEALTH(player2,0))
SET_CHAR_GRAPHIC_TYPE (player2,DUMMY_GRAPHIC,-1)
ENDIF
IF (CHECK_CHARACTER_HEALTH(player1,0))
GIVE_WEAPON (player1,ELECTRO_BATON,20)
ENDIF
IF (CHECK_CHARACTER_HEALTH(player2,0))
GIVE_WEAPON (player2,ELECTRO_BATON,20)
ENDIF
IF (IS_CHARACTER_IN_ANY_CAR(player1))
STORE_CAR_CHARACTER_IS_IN (player1, p1_current_car)
ENDIF
IF ( ( CHECK_CHAR_CURR_WEAPON ( player2 , ELECTRO_BATON ) )
AND ( IS_CHAR_PRESSING_HORN ( player1 ) ) )
SET_CHAR_OBJECTIVE ( player2 , ENTER_CAR_AS_PASSENGER , p1_current_car )
ENDIF
IF (IS_CHARACTER_IN_ANY_CAR(player2))
STORE_CAR_CHARACTER_IS_IN (player2, p2_current_car)
ENDIF
IF ( ( CHECK_CHAR_CURR_WEAPON ( player1 , ELECTRO_BATON ) )
AND ( IS_CHAR_PRESSING_HORN ( player2 ) ) )
SET_CHAR_OBJECTIVE ( player1 , ENTER_CAR_AS_PASSENGER , p2_current_car )
ENDIF
Conversation:
Pyro wrote:
The code is fine (even though you didn't put it in a WHILE loop) and compiles for me. But I had the same problem before if you remember and for some reason it won't compile any new scripts I make even with the most basic code (same error as before and the one you have). I used this code in a MIS file I know compiles and works.
This compiling bug is very strange

Gustavob wrote:
O lol I just noticed I didnt have the while loop and
levelend. It happens frequently to me (forgetting the levelend) actually

It still didnt compiled, but I saved it in another file and now it compiled. No time to test atm, I will test it tomorrow. Maybe the size of the name was too big (player passengers.mis) or it just couldnt have spaces at script names.