Liberty Unleashed
Scripting => Script Help => Topic started by: Trot on March 23, 2011, 04: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?
-
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:
else if ( ExtinguishFire( 1141.2, -68, 7.47, 15.0 ) );
-
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?
-
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...