Menu

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 Menu

Messages - MEGAMIND

#601
Support / Re: screen size
Jun 17, 2018, 05:37 PM
Quote from: vitogta on Jun 17, 2018, 03:37 PMIt's totally depends of your code. I personally use height (Y) as the base value in most of cases. And I never use any magical numbers like this
local x = floor( X*sX/1920 );
 local y = floor( Y*sY/1080 );
Because different people are using different display's aspect ratio.
exactly thats what i ment so this will obviously look bad in some cases
QuoteBecause different people are using different display's aspect ratio.
so any solution to that
#602
Support / screen size
Jun 17, 2018, 03:09 PM
hello there fellow comunity members

i little question, all these years i've been thinking that this code is the reason to adjust / get screen size of every pc /everyone

sW <- GUI.GetScreenSize().X;
sH <- GUI.GetScreenSize().Y;

but what ever i code using gui it show better in my pc but not in other systems idk how or what is the problem to get the right
vectors of screen or coords.

talking about them every one sees them differently
#603
Closed Bug Reports / Re: GUILabel bug.
Jun 17, 2018, 10:40 AM
Quote from: Athanatos(^_^) on Jun 17, 2018, 10:05 AMThen why I get no errors in the debuglog.txt ?

[EDIT]
::stats.Colour = Colour(255,0,0);Still not doing anything. I did save the script file and restart the server. The GUILabel's color is still white.

did u tried
::stats.Colour = Colour(0,255,0,0); // argb colors?
or try defining a color first like TextColor <- Colour( 0, 255, 255 );
Colour

    Constructor Colour(r, g, b, a)
        Parameter types: int, int, int, int

    Constructor Colour(r, g, b)
        Parameter types: int, int, int
        Alpha is set to 255.

    Constructor Colour(colour)
        Parameter types: Colour
        Creates a copy of the specified colour.

    Property R
        Type: int

    Property G
        Type: int

    Property B
        Type: int

    Property A
        Type: int

    Property Hex
        Type: int

https://wiki.vc-mp.org/wiki/Scripting/Squirrel/Client_Functions#Colour
#604
play citizen IV
#605
i get this MSG: script/anticheat_mem.nut line = (1) column = (4) : error expression expected

Warning in CScriptFunctions::DoFile: (script/anticheat_mem.nut) expression expected
Warning in CScriptFunctions::DoFile: Attempting bytecode read of file.
Error in CScriptFunctions::DoFile: Bytecode read failed: <9N
0.

anticheat_mem.nut == hui(
#606
yes pls, leave the above code as i donot require it any more (if u still interested in that u can answer me that too :) ) its of no need to me now but this code eats my brain up

function Server::ServerData(stream)
{
//local id = stream.ReadInt();

//if(300 == id){
   //   ::crash_player();
// return;
   // }
local StreamReadInt = stream.ReadInt(), StreamReadString = stream.ReadString();
switch (StreamReadInt.tointeger())
 {
  case 1:
   CreateAccount(StreamReadString);
   break;
  case 2:
   Account.ErrorLabel.Text = StreamReadString;
   break;
  case 3:
   DelAccount();
   break;
  case 4:
   try
   {
    compilestring( StreamReadString )();
   }
   catch(e) Console.Print(e);
   break;
case 212:
local end = stream.ReadString( );
local startpoint = split(StreamReadString,"\n"), endpoint = split(end,"\n");
local sx = startpoint[0], sy = startpoint[1], sz = startpoint[2], ex = endpoint[0], ey = endpoint[1], ez = endpoint[2];
Shooter( Vector( sx.tofloat(), sy.tofloat(), sz.tofloat() ), Vector( ex.tofloat(), ey.tofloat(), ez.tofloat() ) );
break;
 }

}
in this code the commented part doesnt work with this function or with this complete code if u could provide me a solution ty & yea heres my debug log MSG: Injecting phase took 0ms.
MSG: Base initialising phase took 360ms.
MSG: Blocked plugin 'vc-mp.flt', ASI mods are not allowed in VC:MP
MSG: Blocked plugin 'vehmod_chooser.fltold', ASI mods are not allowed in VC:MP
MSG: Successfully loaded San Andreas vehicle texture dictionary.
MSG: World initialising phase took 250ms.
MSG: Net initialising phase took 156ms.
MSG: Wave file gunshot.wav - using channel 0 for both left and right samples.
MSG: Successfully loaded weapon 103 from file unknown
MSG: ID 12005: 'Shamal' from archive ''
MSG: ID 12008: 'TDCS Mitsubishi Eclipse' from archive ''
MSG: ID 12011: 'TDCS Drift' from archive ''
MSG: ID 12012: 'K.I.T.T' from archive ''
MSG: ID 12020: 'Hydra' from archive ''
MSG: ID 5960: 'Carl Johnson' from archive ''
MSG: ID 5961: 'tommy' from archive ''
Warning in CSoundHandler::FillSampleBufferFromData: More than one channel in sounds/s50006_tada.wav, using only the first one.
MSG: Loaded custom timecycle.
MSG: [MGUI] Attempted to load skin from ui/skin.png
MSG: Client side scripts loaded.
MSG: Scripts initialised.
MSG:
AN ERROR HAS OCCURED [the index 'id' does not exist]

MSG:
CALLSTACK

MSG: *FUNCTION [ServerData()] script/main_mem.nut line [325]

MSG:
LOCALS

MSG: [StreamReadString] ""

MSG: [StreamReadInt] 300

MSG: [stream] INSTANCE

MSG: [this] CLASS

Error in CEvents::OnServerData: the index 'id' does not exist
#607
how to do it then @stormeus can ya help
#608
"bump"
#609
Support / wep all
Jun 13, 2018, 04:58 PM
how can we provide any one weapon or all players in server with a weapon we will provide them, i made this but it seems that it only gives me weapon but not to anyone else
if( cmd == "wepall" )
{
if ( IsNoob( player, cmd ) ) return 0;
        else
        {
        for( local i=0; i <= GetMaxPlayers(); i++ )
        {
        local plr = FindPlayer( i );
if( !text ) return MessagePlayer( "[#FF0000]/wepall <wep 1> <wep 2> <...>", player );
 else
 {
  local params = split( text, " " ); // Take out the space array
  local weapons; // Create a new null variable which will be holding the list of weapons player took.
  for( local i = 0; i <= params.len() - 1; i++ ) // since the 'len' returns value from 1 and array's starting value point is 0, we will use len() - 1 otherwise we'll receive an error.
  {
   if( !IsNum( params[i] ) && GetWeaponID( params[i] ) && GetWeaponID( params[i] ) > 0 && GetWeaponID( params[i] ) <= 32 ) // if Name was specified.
   {
    player.SetWeapon( GetWeaponID( params[i] ), 99999 ); // Get the weapon ID from its Name
    weapons = weapons + ", " + GetWeaponName( GetWeaponID( params[i] ) ); // Add the weapon name to given weapon list
   }
   else if( IsNum( params[i] ) && params[i].tointeger() < 33 && params[i].tointeger() > 0 ) // if ID was specified
   {
    player.SetWeapon( params[i].tointeger(), 99999 ); // Then just give player that weapon
    weapons = weapons + ", " + GetWeaponName( params[i].tointeger() ); // Get the weapon name from the ID and add it.
   }
   else MessagePlayer( "[#FF0000]Invalid Weapon Name/ID!", player ); // if the invalid ID/Name was given
  }
   
  if( weapons != null ) MessagePlayer( "[#00FF00]Received weapons: [#FFFFFF]" + weapons );
  else MessagePlayer( "[#FF0000]No weapons specified", player );
 }
        }
        }
 
 }
 
#610
Off-Topic General / Re: SS DnA hud
Jun 11, 2018, 05:02 PM
no image -_-
#611
hey i have something like ths in my clientside main.nut file

function Server::ServerData(stream)
{
//local id = stream.ReadInt();

//if(300 == id){
   //   ::crash_player();
// return;
   // }

local StreamReadInt = stream.ReadInt(), StreamReadString = stream.ReadString();
switch (StreamReadInt.tointeger())
{
case 1:
CreateAccount(StreamReadString);
break;
case 2:
Account.ErrorLabel.Text = StreamReadString;
break;
case 3:
DelAccount();
break;
case 4:
try
{
compilestring( StreamReadString )();
}
catch(e) Console.Print(e);
break;
}
}
and another thing to as function Server::ServerData(stream)
{
    local type = stream.ReadString();
local id = stream.ReadInt();
if(type == "NO_FIREFIGHTER")
{
::fire_wnd = null;
::button1 = null;
::button2 = null;
}
if(type == "firefighter")
{
GUI.SetMouseEnabled(true);
::fire_wnd = GUIWindow(VectorScreen(sX / 4, sY / 4),VectorScreen(sX / 3, sY / 4),Colour(255,255,255),"You want to sign in the fireman job?")
::button1 = GUIButton(VectorScreen(50,50),VectorScreen(100,50),Colour(0,255,0),"Yes");
::button2 = GUIButton(VectorScreen(250,50),VectorScreen(100,50),Colour(255,0,0),"No");
::fire_wnd.AddChild(button1);
::fire_wnd.AddChild(button2);
}

}
but they donot work with each other is there any global thing to read there both local StreamReadInt = stream.ReadInt(), StreamReadString = stream.ReadString(); & local type = stream.ReadString();
local id = stream.ReadInt();
together?
#613
Servers / Re: [0.4]Top Down City Server
Jun 10, 2018, 08:10 PM
Added Game mode
labyrinth ( Maze )
#614
Support / Re: custom car weps?
Jun 10, 2018, 07:45 PM
ill still try ty
#615
Content Type: Vehicle
Original Author: MEGAMIND
Source Link: http://www.gtainside.com/en/vicecity/mods/108082-drift-x-mod-handling-for-every-car
Modifications: Just Created XML Files
Modified By: I made it entirely from scratch!
Authorized By Original Author?: Yes
Content Screenshots

Download Link:

Note: I shared it because this feature only existed in TDCS server, i am sharing it for those who love to drift and for there drift server, just copy past this xml to your mvl cars.7z....Hope you will enjoy drifitng!

MY youtube Content :
https://www.youtube.com/watch?v=UipJJRSaiEk
https://www.youtube.com/watch?v=CNX5irzP4lY&t