Author Topic: Firefighters mission  (Read 3022 times)

Trot

  • Newbie
  • *
  • Posts: 28
  • Karma: +0/-1
    • View Profile
Firefighters mission
« on: March 23, 2011, 05:25:13 am »
I would like to create a semblance of missions for the firefighters. Beginning of the script works. Activation of the script begins with the sphere.

function onPlayerEnterSphere( pPlayer, sphere )
{
if ( sphere.ID == 9 )
{
BigMessage( pPlayer"~r~fight with fire!!!", 6000, 2 );
CreateExplosion( 1141.2, -64, 7.47, 5 );
CreateExplosion( 1141.2, -68, 7.47, 5 );
CreateBlip(BLIP_NONE, 1141.2, -68, 7.47);
CreateFire( 1141.2, -68, 7.47, 15.0 );


But when I add this part, the game crashes.


else if ( ExtinguishFire( 1141.2, -68, 7.47, 15.0 ) );
{
RemoveBlip(BLIP_NONE, 1141.2, -68, 7.47);
RemoveFire( 1141.2, -68, 7.47, 15.0 );
pPlayer.Cash = pPlayer.Cash + 200;
}
}
return 1;
}

What is my mistake?



Juppi

  • Developer
  • Jr. Member
  • *****
  • Posts: 86
  • Karma: +3/-1
    • View Profile
    • Kuslahden alaste GTA:MP clan
Re: Firefighters mission
« Reply #1 on: March 23, 2011, 12:09:17 pm »
Where did you get the functions RemoveBlip and RemoveFire? Since those aren't LU functions I'm guessing theyre your own, and to fix the problem it would be useful to see them as well.

Also your syntax is incorrect, the else if line doesn't use a semicolon:
Code: [Select]
else if ( ExtinguishFire( 1141.2, -68, 7.47, 15.0 ) );

Trot

  • Newbie
  • *
  • Posts: 28
  • Karma: +0/-1
    • View Profile
Re: Firefighters mission
« Reply #2 on: March 23, 2011, 04:15:00 pm »
Where did you get the functions RemoveBlip and RemoveFire? Since those aren't LU functions I'm guessing theyre your own, and to fix the problem it would be useful to see them as well.

While you can do so with the disappearance of the fire, the icon disappeared and the mission would be considered completed? What need command?

Bio

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Firefighters mission
« Reply #3 on: May 03, 2011, 05:12:59 am »
Trick:  adding a sphere inside the fire one must enter to complete the mission? U have to extinguish the fire to get to that sphere alive.

But it rather see it done properly tho...
« Last Edit: May 03, 2011, 05:14:54 am by Bio »

 

© Liberty Unleashed Team.