Liberty Unleashed
Scripting => Script Help => Topic started by: Thomas1907 on May 21, 2011, 07:23:59 pm
-
Hello i want a script so if player enter my server they see a image but i saw an other script but it doesnt work
the server wont load it!?
help plz
-
What you need is a client-side script which you add into Script.xml in the following manner:
<script file="ZoomInOnPlayer.nut" client="1"/>
The functions you need to use can be found below:
http://liberty-unleashed.co.uk/LUWiki/Squirrel/Client/Functions#Sprite_Functions
and examples for creating GUI elements are aplenty in Script Releases (http://forum.liberty-unleashed.co.uk/index.php?board=19.0).
-
i have that but if i change the 1 to a 0 i see it in server.exe and i know if i change it back to 1 it ownt be displayed because it is a client script,, but it says on script load message to a player that it is loaded but i dont see it
-
Press ` ingame to open your console.
It echoes there.
-
Yeah i see it there but the only thing i dont see is the picture i only changed gif to jpg and made the picture a jpg ??
both names in script and picture is a.jpg in script it is also a.jpg not a.JPG
-
Did you add the image file to your Script.xml?
-
i did so ,, i think i uploaded the map here
http://www.2shared.com/file/VRmLNkMP/Script.html
it also says ingame with `button that its loaded so its the image it think i will try bmp once then img
Edit1:
hm thought i got it but not,, look at this: Look at reklama
g_pLocalPlayer <- FindLocalPlayer();
function onScriptLoad()
{
print( ">> image script by xXxMDjxXx loaded\n" );
g_Reklama <- GUISprite( "a.gif", VectorScreen( ScreenWidth - 150, ScreenHeight - 500 ) );
g_Reklama.Visible = false; <----------------------------------------
AddGUILayer( g_Reklama );
return 1;
}
function onClientRequestClass( pClass )
{
g_reklama.Visible = true;
return 1;
}
function onClientSpawn( pClass )
{
g_reklama.Visible = false; <-------------------------------
return 1;
}
Edit2:
One thing more i dont see a location?
EDIT YOUR POSTS AND DON'T TRIPLE POST
-
Please use the post Modify feature.
The problem is obvious but I'll only help if you get rid of the triple post :/
-
I have to agree with Windlord on this one, I haven't seen triple posting in YEARS, please try to refrain from multi-posting, The modify button was created for a reason.
Regards Orpheus.
EDIT: See how it now says I modified this post. It's useful :)
-
ok srry but how can i solve the problem ??
i want the picture ingame but is it the script or the picture??
-
Seems you don't get it so I edited your post for you.
With regards to your issue, remember that you only have a.jpg available, not a.gif.
Also, Squirrel is case-sensitive and therefore g_Reklama is not equivalent to g_reklama.
-
Thx for the help i got it working by adding a client.nut
If you want the package here it is: http://www.2shared.com/file/mPG4FdR3/ImageOnConnect.html
THY! ;D
But now i Searched on WIKI for a Position i added GUISprite.pos = 500, 500
but now i dont see the picture anymore!?
-
Great!
It'll have to be
GUISprite.Pos = VectorScreen( 500, 500 );
-
Nothings changing is there a specific place to put it or not?
Never mind
Solved!