Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


  Show Posts
Pages: [1]
1  Scripting / Script Help / GUI Help on: January 08, 2012, 07:03:14 pm
Since Im a total noob in GUI, idk how to make this.
Basicly Im trying to make the M button to display a Map pic of the whole liberty
I took an example from Juppi's speedo script but still failed.
Here is the code:

Script.xml
Code: [Select]
<script file="MAPGUI.nut" client="1"/>

<sprite file="gta3map.png" />


MAPGUI.nut
Code: [Select]
// Map settings
g_bEnabled <- true;
g_vMapPos <- VectorScreen( ScreenWidth - 0, ScreenHeight - 0 );

/*
 * LU Events
 */
 
 function onScriptLoad()
{
print( "Version 0.1, written by [VU_R]Raiden" );

BindKey( 'M', BINDTYPE_DOWN, "Map", player );

// Create sprites
::g_Map <- GUISprite( "gta3map.png", ::g_vMapPos );
::g_Map.Visible = false;

// Add layers for each sprite so that they are rendered
AddGUILayer( ::g_Map );


return 1;
}
 
function Map()
{
::g_Map.Visible = true;
}

And the Sprites folder which contains the file.

Scripts
    Map
        Sprites
            gta3map.png
2  Scripting / Scripting Discussion / Explosion on: January 04, 2012, 10:57:27 pm
Code: [Select]
if ( cmd == "explosion" )
     {
          local pos = player.Pos;
          pos.x += 5.0;
         
          CreateExplosion( pos, 1 );
     }

Code: [Select]
g_LocalPlayer <- FindLocalPlayer();

function onClientShot( pPlayer, iWeapon, iBodypart )
{
if ( g_LocalPlayer.Immune == false )
         {
if ( iWeapon == WEP_EXPLOSION )
{
   
g_LocalPlayer.RemoveLimb( BODYPART_LEFTARM )
ShakeCamera( pPlayer, 30000 );
         
}
         }
    return 1;
}

Wonder why wen I blowup a car ingame my arm falls, and wen I use /explosion wen the it explodes near me nothing happens even wen my player gets hit by it.
Tried with different types of explosion and still no shit.
How is that possible wen the car blows up its an EXPLOSION and my player's arm falls. And wen I simulate an EXPLOSION with the cmd nothing happens.


Any IDEAS?
Pages: [1]
© Liberty Unleashed Team.