Show Posts
|
Pages: [1]
|
2
|
Scripting / Scripting Discussion / Music on Spawn (Script)
|
on: April 12, 2011, 08:42:43 pm
|
Shnurok and I, as an assistant, developed a script that plays music when player spawn.
Here it is:
function onScriptLoad() { spawn_Sound <- null; }
function onClientSpawn( player ) { if ( !spawn_Sound ) { spawn_Sound = FindSound( "mysound.mp3" ); if ( spawn_Sound ) { spawn_Sound.Open(); spawn_Sound.Play(); } } else { spawn_Sound.Play(); } }
|
|
|
4
|
Liberty Unleashed / Support / What happened?
|
on: April 11, 2011, 10:24:47 pm
|
My server shuting down every time. Also i don't see any other servers in client list. What the update was that? What happened guys???
|
|
|
6
|
Liberty Unleashed / Bug Reports / Wrong id in wiki
|
on: March 23, 2011, 07:39:48 pm
|
I found error in wiki or maybe my game see that object under thats id.
Objects id -> 828 = stairs from Chinatown el-train platform
828 - it is very big building.
Maybe you'll check this?
|
|
|
7
|
Scripting / Script Help / 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?
|
|
|
8
|
Scripting / Script Help / Like Patriot playground...
|
on: March 18, 2011, 07:52:56 pm
|
Hi!That's already 4 o'clock I'm trying to make a coherent chain of checkpoints. Here is my script. I just do not understand what I am wrong.
function onPlayerEnterSphere( pPlayer, sphere ) { if ( sphere.ID == 8 ) { CreateCheckpoint( Vector( -869, -751.9, 10.49 ), 5.0, Colour( 0, 245, 0 ) ); CreateCheckpoint( Vector( -818.6, -870.1, 10.76 ), 5.0, Colour( 0, 245, 0 ) ); CreateCheckpoint( Vector( -907.7, -882.3, 10.76 ), 5.0, Colour( 0, 245, 0 ) ); CreateCheckpoint( Vector( -972.2, -882.1, 10.76 ), 5.0, Colour( 0, 0, 0 ) ); } return 1; }
function onPlayerEnterCheckpoint( pPlayer, checkpoint ) { if ( checkpoint.ID == 0 ) { CreateCheckpoint( Vector( -818.6, -870.1, 10.76 ), 5.0, Colour( 0, 0, 0 ) ); checkpoint.Type = MARKER_TYPE_VEHICLE; checkpoint.Remove(); }
else if ( checkpoint.ID == 1 ) { CreateCheckpoint( Vector( -818.6, -870.1, 10.76 ), 5.0, Colour( 0, 0, 0 ) ); checkpoint.Type = MARKER_TYPE_VEHICLE; checkpoint.Remove(); }
else if ( checkpoint.ID == 2 ) { CreateCheckpoint( Vector( -907.7, -882.3, 10.76 ), 5.0, Colour( 0, 0, 0 ) ); checkpoint.Type = MARKER_TYPE_VEHICLE; checkpoint.Remove(); } else if ( checkpoint.ID == 3 ) { CreateCheckpoint( Vector( -972.2, -882.1, 10.76 ), 5.0, Colour( 0, 0, 0 ) ); checkpoint.Type = MARKER_TYPE_VEHICLE; checkpoint.Remove(); } return 1; }
|
|
|
|