sprite covering the whole screen

Started by rulk, May 03, 2016, 03:38 PM

Previous topic - Next topic

MEGAMIND

Quote from: KAKAN on Jul 20, 2016, 05:58 PMI no longer script in VCMP :p
but, you can give a try to GUIMemobox
GUIMemobox

Constructor GUIMemobox()

Constructor GUIMemobox(position, size, colour)
Parameter types: VectorScreen, VectorScreen, Colour

Constructor GUIMemobox(position, size, colour, flags)
Parameter types: VectorScreen, VectorScreen, Colour, int

Function AddLine(line)
Parameter types: string. Return type: void.

Function AddLine(line, colour)
Parameter types: string, Colour. Return type: void.

Function Clear()
Return type: void.

Property DisplayPos
Type: float

Property LineHeight
Type: int

Property LineCount (read-only)
Type: int

Property HistorySize
Type: int
what does it do actually

Thijn

Quote from: MEGAMIND on Jul 20, 2016, 06:01 PM
Quote from: KAKAN on Jul 20, 2016, 05:58 PMI no longer script in VCMP :p
but, you can give a try to GUIMemobox
GUIMemobox

Constructor GUIMemobox()

Constructor GUIMemobox(position, size, colour)
Parameter types: VectorScreen, VectorScreen, Colour

Constructor GUIMemobox(position, size, colour, flags)
Parameter types: VectorScreen, VectorScreen, Colour, int

Function AddLine(line)
Parameter types: string. Return type: void.

Function AddLine(line, colour)
Parameter types: string, Colour. Return type: void.

Function Clear()
Return type: void.

Property DisplayPos
Type: float

Property LineHeight
Type: int

Property LineCount (read-only)
Type: int

Property HistorySize
Type: int
what does it do actually
Coding a snippet using those is like 5mins of work. So instead of you asking what something does, try it out :)

MEGAMIND


KAKAN

Quote from: MEGAMIND on Jul 20, 2016, 06:52 PMwhere to add this thing sir
Create a file called main.nut
And put that file in yourserver/store/scripts
Then, put this inside that file:-
Memo <- GUIMemoBox( VectorScreen(1280,720), VectorScreen(10,10), Colour(0,1,0) );
//Check the syntax, it might not be correct.
Memo.AddLine( " My new FOcking textdraw!");
Memo.AddLine( "Another line bich");
oh no

MEGAMIND

will i have to make a dofile in my main.nut to run dofile( "Store/Scripts/main.nut" ); ?
if not sir i think ur sysntax is wrong im  new at this thing so please guide step by step

DizzasTeR

Quote from: MEGAMIND on Jul 21, 2016, 09:31 AMwill i have to make a dofile in my main.nut to run dofile( "Store/Scripts/main.nut" ); ?
if not sir i think ur sysntax is wrong im  new at this thing so please guide step by step

First of all its not 'Store' its 'store', also its 'script' folder not 'Scripts. Now.... You won't need to add the dofile( "store/scripts/main.nut" ) in your main scripts.

You just add a main.nut in store/script/here and then do your client-side scripts in there

MEGAMIND

is that how we do it

GUIMemobox

Constructor GUIMemobox()

Constructor GUIMemobox(position, size, colour)
Parameter types: VectorScreen, VectorScreen, Colour
Memo <- GUIMemoBox( VectorScreen(1280,720), VectorScreen(10,10), Colour(0,1,0) );

Constructor GUIMemobox(position, size, colour, flags)
Parameter types: VectorScreen, VectorScreen, Colour, int

Function AddLine(line)
Parameter types: string. Return type: void.
Memo.AddLine( " My new FOcking textdraw!");

Function AddLine(line, colour)
Parameter types: string, Colour. Return type: void.
Memo.AddLine( "Another line bich");

Function Clear()
Return type: void.

Property DisplayPos
Type: float

Property LineHeight
Type: int

Property LineCount (read-only)
Type: int

Property HistorySize
Type: int

 function Script::ScriptLoad( ) {

LoadScript( "main.nut" );
dofile( "main.nut" );
include( "main.nut" );
Console.Print("Hello World!");
print( "Client side scripts loaded." );
Console.Print( GetTicks( ).tostring( ) );

}
function Script::ScriptUnload()
{
    Console.Print("Disconnect!");
}

 function Player::PlayerDeath( player ) {

Console.Print( player.Name + " has died." );

}

kindly help im new at  this side

Finch Real

My Snipet Showroom

http://pastebin.com/5KKuU5cg

Thijn

No that's not how you do it. You just copy pasted the documentation. If you had any sense of coding you would see the syntax is all wrong.

Copy what @KAKAN has posted and see what it does.

MEGAMIND

Quote from: KAKAN on Jul 21, 2016, 09:06 AM
Quote from: MEGAMIND on Jul 20, 2016, 06:52 PMwhere to add this thing sir
Create a file called main.nut
And put that file in yourserver/store/scripts
Then, put this inside that file:-
Memo <- GUIMemoBox( VectorScreen(1280,720), VectorScreen(10,10), Colour(0,1,0) );
//Check the syntax, it might not be correct.
Memo.AddLine( " My new FOcking textdraw!");
Memo.AddLine( "Another line bich");
i did the same thing and nothing happens

KAKAN

Sorry, paste it in store/script and not store/scripts
oh no

MEGAMIND






tell me if i am mistakened or if any new version available and plugins

DizzasTeR

Should be like this:
Logo <- null;
Memo <- null;

function Script::ScriptLoad() {
    Logo = GUISprite( "squirrel_logo.png", VectorScreen( 0, 0 ) );
    // Logo.Size = VectorScreen( Width, Height ) // You can resize the sprite
    Memo <- GUIMemobox( VectorScreen( 1221, 700 ), VectorScreen( 10, 10 ), Colour( 255, 255, 255, 255 ) );
    Memo.AddLine( "First line" );
    Memo.AddLine( "Second line" );
}

MEGAMIND



this happened to me when i updated plugins form here http://forum.vc-mp.org/?board=4.0

and  know i got thses errors if any new version or plugin available kindly provide link





KAKAN

Just remove that plugin from server.cfg file and you're good to go.
oh no