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.

Topics - Razor.
1
Snippet Showroom / [Beta] Individual Gravity system
« on August 1st, 06:58 AM »
Individual Gravity system v0.2b

VC:MP itself has the possibility to change the gravity, however this function when used affects the gravity of all players, but today I bring a practical way to solve this.


Here's a video showing how it works for someone who wants to see it before testing the code: https://www.youtube.com/watch?v=-Jg6U0nmjNs&feature=youtu.be



Repository (v0.2b)
https://github.com/Razorn7/Individual-Gravity-VCMP


Install:
  • Download the script files from the repository above and past in scripts/ folder.
  • Load the script using dofile("scripts/i_gravity.nut");.
  • Adept this to some events:
Code: [Select]
function onPlayerJoin(player) {
CGravity.join(player);
}

function onPlayerMove(player, lastX, lastY, lastZ, newX, newY, newZ) {
CGravity.processMove(player);
}


    How to use:
    • -Simple, after you have added the script, execute the player.SetGravity(some value here, must be number) in any part of you code you want, then gravity will take effect on the entity.
    Added functions:
    Code: [Select]
    player.SetGravity(number gravity)
    player.GetGravity(void)

    Example:
    (click to show/hide)
    Code: [Select]
    function onPlayerCommand(player, cmd, text)
    {
    if ( cmd == "setgravity" ) {
    if (!text) PrivMessage(player, "Use: /" + cmd + " <player/ID> <value>");
    else {
    local plr = FindPlayer(GetTok(text, " ", 1));
    if (!plr) PrivMessage(player, "Invalid player.");
    else {
    local value = GetTok(text, " ", 2);
    if (value == null) PrivMessage(player, "You must input a value.");
    else if (!IsNum(value)) PrivMessage(player, "The value type must be integer|float.");
    else {
    plr.SetGravity(value.tointeger());
    PrivMessage(player, "You've set " + plr.Name + "'s gravity to: " + value.tointeger() + ".");
    }
    }
    }
    }
    }

    /* GetTok() by KAKAN
       https://pastebin.com/fLTXmNb6 */

    function GetTok(string, separator, n, m = 0) {
    n = n - 1;
    m = m > 0 ? m : n + 1;
    local tokenized = split(string, separator),
    text = "";
    if(n > tokenized.len() || n < 0 || m > tokenized.len()) return null;
    tokenized = tokenized.slice(n, m);
    return tokenized.reduce( function(prev, next) { return (prev + separator + next) });
    }


    Notes:
    • This won't work as own VCMP gravity.
    • The default gravity value is 0.
    • This will just work if the player's gravity is != 0.
    • Negative numbers will work too.


    Thanks to S.L.C for clarifying a doubt so that the player.SetGravity() return would work the way I wanted.
    2
    Bugs and Crashes / [Bug] GUILabel().Text color not changing.
    « on March 23rd, 05:57 PM »
    Description:
    GUILabel().Text color not updating/reseting after text change.

    Reproducible:
    Always.

    How to reproduce:

    Code: [Select]
    Label <- GUILabel();
    Label.TextColour = Colour(255, 255, 255, 255);
    Label.AddFlags(GUI_FLAG_TEXT_TAGS);
    Label.FontFlags = GUI_FFLAG_BOLD;
    Label.Text = "[#ff00ff]purple colored text";
    //Example 2: "purple colored [#ff00ff]text";

    After this, change the GUILabel().Text value:
    Code: [Select]
    Label.Text = "purple colored text";
    or
    Code: [Select]
    Label.Text = "purple colored[#ffffff0] text";
    Even putting a color or not, the text color will not change or will not change correctly.

    I realized the test using a client-side /execc.
    3
    Script Showroom / [Release] In-game object hide/show editor
    « on March 16th, 09:43 PM »
    In-game object hide/show editor

    • Introduction: I know that a lot of people who went through the scripting area at VC: MP find it boring or boring to go to the mED or any other map editor to get the ID and the coordinates of the object and then hide it or show it. Now with this editor, it is much easier to do this job.

    • Guide:
      Just enter the editor, use the command: /editmode on (BOOL), after that the server will give you an M60, shoot it against any object and press DELETE (To hide) or INSERT (To show) (WARNING: If you press DELETE to hide the object and then exit editing, it will not be possible to revert the object through automatic means).

    • Commands and Keys:
      (click to show/hide)
      Code: [Select]
      /editmode <on/off> --> Enable/Disabled edit mode
      INSERT --> Show the object.
      DELETE --> Hide the object.
      BACKSPACE --> End the edition.



    • Notes:
      • WARNING: If you press DELETE to hide the object and then exit editing, it will not be possible to revert the object through automatic means.
      • You can't delete LOD's using this editor.
      • The object list is saved in Database, so they'll load (be hidden) at server start.
      • The selected object will be saved in database when pressing the button [DELETE], or deleted of database if pressing the button [INSERT].
    4
    Servers / The Vest Survivor
    « on February 9th, 06:43 PM »

    The Vest Survivor

    Welcome to The Vest Survivor, we would like to welcome you! The game-mode is about two rival teams, red and blue; the objective of the game is to capture the vest and keep it longer to add points to your team. Come and adventure with us in this new experience!

    What can we expect from The Vest Survivor?

    A selection of innovative weapons with 9 sets:


    Emotes for fun while the round has not started:


    Information about the killer and his survival time:


    Different skins for everyone:

    And much more!

    See you.





    • Thanks:
      • Support: Shakur, Naru & Fantasma for supporting since I started my scripts.
      • Sever credits: To Lucas & Naru for helping with doubts and working in some scripts, to MatheuS for using his snippets.
      • Server Hosting: To 4K. for providing hosting services.
      • Designs: To ShaKur for making designs such as weapon pack, tops and score.
      • Modeling: To Naru for modeling objects so that the lobby can be corrected.
      • Mapping: To HeGaMer0177, Nelvis14^ who made themselves available to make the server bases and decorating the lobby.
    5
    General Discussion / [Suggestion] Radar centre, weapon images & pink arrow
    « on January 15th, 05:49 PM »
    There's a method to change/add map marks, radardisc, radar map and menu map, but there's not a way to change radar centre blip and player's weapon images. Would be cool and util add it before the 0.4.7 update.

    For who not understand what I mean by radar centre blip:


    Second suggestion is supposed to add pink arrow:
    It would be interessant to see some day.
    6
    General Discussion / A declaration about bad conditions.
    « on July 6th, 2020, 07:16 PM »
    VC:MP is the modification of VC, where we can have fun playing with each other, however, there are many toxic people who, although they are not welcome, are in this community, sometimes some people who try to play for fun do not have a good connection or a good computer to perform the minimum VC requirements and still try to play to feel happy and because you like the game, but among them there are many players who do not have or do not know the meaning of the word "empathy", and the lack of it ends up resulting in comments like "lagger", "you have a 2001 pc", "potato pc", "buy new internet plz", "shit lagger", "you have a hit internet", "hahaha 500 ping, lagger"," he lives in * country*", "poor", "junk pc", "poor pc", as I said above, many people are not in a great position to play and come across these ridiculous comments from toxic people, but you what do it this, are you interrupted to think that it can affect the person a lot? Today, thanks to God, I have better conditions to play. I've been through these comments and I know how difficult it is... if someone who has this problem or has had it, just ignore it, play for your enjoyment! As for the players who still do this without having a hint of concectibility of what they are talking about, be more humble, this is just a game, anyway, respect the next one.
    7
    General Discussion / [Help] LUnet?
    « on April 22nd, 2020, 03:37 AM »
    Hey guys, anyone know to give permanent level in users on LUnet?
    Or are disabilited?
    Thanks.
    8
    Videos & Screenshots / [EML] - Emergency Lights v0.2
    « on April 8th, 2020, 06:12 AM »
    v0.2

    https://www.youtube.com/watch?v=EAVzyNQuEME&feature=youtu.be

    Script made by me.

    Especial Credits to @Sebastian (Top and front lights)
    @PerikiyoXD (Wheel fix)


    v0.1
    (click to show/hide)
    https://youtu.be/RP9-128Wxn8
    9
    General Discussion / Fake Players to Get #1 in master list.
    « on August 21st, 2017, 03:58 AM »
    Is the same player allowed to enter multiple nicks on the same pc on a server to give players?
    @Stormeus @Castagna
    http://imgur.com/a/Tci90
    http://imgur.com/a/K2ZCw
    In the screenshots you can see that the player is coming in with different nicknames on the same pc to give players on the server.
    10
    Hey guys, who have command to found pickup with meters? Like /loc command.
    Example: Pickup Location: Viceport 203 meters.
    11
    General Discussion / [04rel003] Does anyone have these plugins? If you have me please
    « on June 15th, 2017, 12:18 AM »
    Please someone has the 04rel003 plugins for linux 64 bit? I'm thinking of going back in the previous version but I can not find these plugins anywhere. Note: I need these plugins to connect my server to another version on the host, if someone can pass me I appreciate it ;)

    I need the following plugins(04rel003):

    announce04rel32.so
    sockets04rel32.so
    sqlite04rel32.so
    squirrel04rel32.so
    12
    Scripting and Server Management / [04rel004] How to create texdraw in Client-Side.
    « on June 12th, 2017, 04:30 AM »
    Hey Guys.
    Please, I want to know how to create textdraws in Client-Side...
    Thanks for helping.
    13
    Scripting and Server Management / How to hide main.nut on client
    « on May 27th, 2017, 09:28 PM »
    How to hide client Main.nut on Server/Store/Script/?
    14
    Scripting and Server Management / [04rel003] How to delete textdraw after time?
    « on May 24th, 2017, 10:52 PM »
    How to delete textdraw after 1 second?
    Need timer?
    15
    Scripting and Server Management / [04rel003] How to create Textdraw?
    « on May 17th, 2017, 02:10 AM »
    Please, how to create Textdraw??

    Thanks.