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

Topics - MatheuS

#1
General Discussion / Bots?
Feb 10, 2020, 09:56 PM


Creating connection on the same computer to be first in the list?
#2
I formatted my computer a short time ago and whenever I start the first game the game doesn't open. I need to finish the process and reopen the game in order to play. Does anybody know how to solve this? Is it because I'm using the game in windowed mode?
#3
Script Showroom / [0.4] Vote System
Jul 30, 2019, 12:37 PM
Requeriments:


For beginners (to install the SLC Timer System):

1° Add this line inside your onScriptLoad()

[noae][noae][noae][noae][noae][noae][noae]dofile("timers.nut")[/noae][/noae][/noae][/noae][/noae][/noae][/noae]

2° Copy this below and paste it into some file and save as "timers.nut".

[noae][noae][noae][noae][noae][noae][noae]// ------------------------------------------------------------------------------------------------
srand((GetTickCount() % time()) / 3);

// ------------------------------------------------------------------------------------------------
_Timer <- {
    // --------------------------------------------------------------------------------------------
    m__Timers = { /* ... */ }

    // --------------------------------------------------------------------------------------------
    function Create(environment, listener, interval, repeat, ...)
    {
        // ----------------------------------------------------------------------------------------
        // Prepare the arguments pack
        vargv.insert(0, environment);
        // ----------------------------------------------------------------------------------------
        // Store timer information into a table
        local data = {
            Environment = environment,
            Listener = listener,
            Interval = interval,
            Repeat = repeat,
            Timer = null,
            Args = vargv
        };
        // ----------------------------------------------------------------------------------------
        local hash = split(data+"", ":")[1].slice(3, -1).tointeger(16);
        // ----------------------------------------------------------------------------------------
        // Create the timer instance
        data.Timer = NewTimer("tm_TimerProcess", interval, repeat, hash);
        // ----------------------------------------------------------------------------------------
        // Store the timer information
        m__Timers.rawset(hash, data);
        // ----------------------------------------------------------------------------------------
        // Return the hash that identifies this timer
        return hash;
    }

    // --------------------------------------------------------------------------------------------
    function Destroy(hash)
    {
        // See if the specified timer exists
        if (m__Timers.rawin(hash))
        {
            // Destroy the timer instance
            m__Timers.rawget(hash).Timer.Delete();
            // Remove the timer information
            m__Timers.rawdelete(hash);
        }
    }

    // --------------------------------------------------------------------------------------------
    function Exists(hash)
    {
        // See if the specified timer exists
        return m__Timers.rawin(hash);
    }

    // --------------------------------------------------------------------------------------------
    function Fetch(hash)
    {
        // Return the timer information
        return m__Timers.rawget(hash);
    }

    // --------------------------------------------------------------------------------------------
    function Clear()
    {
        // Process all existing timers
        foreach (tm in m__Timers)
        {
            // Destroy the timer instance
            tm.Timer.Delete();
        }
        // Clear existing timers
        m__Timers.clear();
    }
}

// ------------------------------------------------------------------------------------------------
tm_TimerProcess <- function(hash)
{
    // See if the specified timer exists
    if (_Timer.m__Timers.rawin(hash))
    {
        // Get the timer associated with the specified hash
        local tm = _Timer.m__Timers.rawget(hash);
        // Call the specified listener
        tm.Listener.pacall(tm.Args);
        // Calculate the remaining cycles
        if (tm.Repeat && (--tm.Repeat <= 0))
        {
            // Release the timer
            _Timer.Destroy(hash);
        }
    }
}
[/noae][/noae][/noae][/noae][/noae][/noae][/noae]



The beautiful sexy awesome strong code:

Pastebin: (With better formatting)
https://pastebin.com/0JQcu7EH

[noae][noae][noae][noae][noae][noae][noae]/*
VoteSystem
Developed by: Lucas
Credits: Matheus/Takanaue (I did nothing but I'm here)
*/

VoteStarted <- false;
VoteText <- null;
VoteY <- 0;
VoteN <- 0;
VoteTime <- 0;
VoteList <- {};

function onScriptLoad()
{
N <- BindKey( true, 0x4E, 0, 0 );
Y <- BindKey( true, 0x59, 0, 0 );
}

function onPlayerJoin( player )
{
VoteList.rawset( player.ID, "none" );
}

function onPlayerPart( player, reason )
{
VoteList.rawdelete( player.ID );
}

function onKeyDown( player, key )
{
if ( key == N )
{
if ( VoteStarted )
{
switch ( VoteList[ player.ID ] )
{
case "yes":
VoteY > 0 ? VoteY -- : false;
VoteN ++;
VoteList.rawset( player.ID, "no" );
PrivMessage( player, "Okay, you've changed your vote." );
break;

case "none":
VoteN ++;
VoteList.rawset( player.ID, "no" );
PrivMessage( player, "Feedback computed." );
break;
default: break;
}
}
}

else if ( key == Y )
{
if ( VoteStarted )
{
switch ( VoteList[ player.ID ] )
{
case "no":
VoteY ++;
VoteN > 0 ? VoteN -- : false;
VoteList.rawset( player.ID, "yes" );
PrivMessage( player, "Okay, you've changed your vote." );
break;

case "none":
VoteY ++;
VoteList.rawset( player.ID, "yes" );
PrivMessage( player, "Feedback computed." );
break;
default: break;
}
}
}
}

function Result()
{
local y_calc, n_calc;
AnnounceAll( "The time is over!" ,1 );
Message( "[#DCDCDC]Result of the votes:" );

if ( VoteY == VoteN && VoteY > 0 ) y_calc = "50", n_calc = "50";
else if ( VoteY > VoteN ) y_calc = ( !VoteY ? "0" : ( 100 - ( ( VoteN.tofloat() / VoteY ) * 100 ) ) ), n_calc = ( !VoteN ? "0" : ( ( VoteN.tofloat() / VoteY ) * 100 ) );
else y_calc = ( !VoteY ? "0" : ( ( VoteY.tofloat() / VoteN ) * 100 ) ), n_calc = ( !VoteN ? "0" : ( 100 - ( VoteY.tofloat() / VoteN ) * 100 ) );

Message( "[#DCDCDC]- Number of votes yes: [#FF0000]" + VoteY + "[#DCDCDC](" + y_calc + "%)" );
Message( "[#DCDCDC]- Number of votes no: [#FF0000]" + VoteN + "[#DCDCDC](" + n_calc + "%)" );

// Resetting the results
VoteStarted = false;
VoteText = null;
VoteY = 0;
VoteN = 0;
foreach ( idx, val in VoteList ) VoteList.rawset( idx, "none" );
}

function VoteClock()
{
AnnounceAll( format( "Ends in " + VoteTime + " second%s...", VoteTime == 1 ? "" : "s" ), 1 );
VoteTime --;
}

function onPlayerCommand( player, cmd, text )
{
if ( cmd == "vote" )
{
if ( !text ) MessagePlayer( "/" + cmd + " <text/off>.", player );
else
{
if ( text == "off" )
{
if ( !VoteStarted ) MessagePlayer( "No vote in progress." player );
else
{
VoteStarted = false;
VoteText = null;
VoteY != 0 ? VoteY = 0 : false;
VoteN != 0 ? VoteN = 0 : false;
VoteTime = 0;
_Timer.Destroy( _Result );
_Timer.Destroy( _VoteClock );
Message( "[#9B30FF]* Admin. [#B5B5B5]" + player.Name + " [#9B30FF]closed the poll." );
}
}
else
{
if ( VoteStarted ) MessagePlayer( "There is a vote in progress.", player );
else
{
VoteStarted = true;
VoteText = text;
VoteTime = 29;
Message( "[#9B30FF]* Admin. [#B5B5B5]" + player.Name + " [#9B30FF]started a poll." );
Message( "[#DCDCDC]~ " + text + " ~\nPress [#00FF00]\"Y\" [#DCDCDC]to vote yes or [#FF0000]\"N\" [#DCDCDC]to vote no." );
AnnounceAll( "Ends in " + VoteTime + " seconds...", 1 );
_Result <- _Timer.Create( this, Result, 30000, 1 );
_VoteClock <- _Timer.Create( this, VoteClock, 1000, VoteTime );
}
}
}
}
}
[/noae][/noae][/noae][/noae][/noae][/noae][/noae]


Commands:

[noae][noae][noae][noae][noae][noae]/vote TEXT        //if your text is "OFF" the votation will be stopped[/noae][/noae][/noae][/noae][/noae][/noae]
[noae][noae][noae][noae][noae][noae]To reply negatively press N and To reply positively press Y[/noae][/noae][/noae][/noae][/noae][/noae]
#4
Why the download and upload speed for downloading files in VCMP is so low?
#5
General Discussion / [Suggestion] Memobox
Aug 13, 2018, 07:07 PM
Memobox.EditLine( lineNumber, string );
It would be best not to create multiple Label to create texts that change string constantly.

Is it possible?



Implementing add this also:

Memobox.ReadLine( lineNumber );
#6
Servers / [0.4] Brasil Real RPG [RPG/DM]
Jul 17, 2018, 02:31 PM





Server IP: 149.56.143.129:5194
Version: v3.0 (006rel)
IRC Channel: #BRL on GTANet
Add to Favorites: Click here
Join to the Server: Click here
WebSite: Our forum
Youtube Channel: Click here
Like us on Facebook: Click here
Developers: Diego, Lucas and MatheuS
Credits: (LBR)George, [Ro]Seby






(LBR)Diego^
(LBR)Lucas
[LBR]MatheuS




-



(LBR)Joseph^
[LK]Rorro
[LBR]HenriquE
(SPK_R)Carlos^








[LKt]Zeth
Eduardo



[LKt]Stillz



Leandro
Guads
Iago



[LK]Rorro
Dadero[LK]
(SPK_R)Carlos^
[LBR]HenriquE
[LBR_T]Ninja
[LKt]Zeth
Richter





Some systems

Portuguese, English and Spanish Language
Car system (/buy, /sold (to player or to the server) and /robcar)
Houses and Business system
Hungry and Thirsty
DM and RPG
Event like Fall/Battle/LMS/Derby and others
Soccer (or football) system
Jobs (trucker, police, drug delivery, money delivery and others (18 in total)
Race System (you can invite other player)
Gang system with spawnskin, spawnweapon, spawnlocation and others(you can create your own gang and invite your friends)
Fuel and NOS
Menus GUI
New HUD
...

Please delete the old other post created by Diego
#7
Bugs and Crashes / [BUG?] Window
Jul 15, 2018, 01:42 AM
Description

The "close" button it's too dark and colorless




Reproducible
Always

What you were doing when the bug happened
Always when an window is opened

What you think caused the bug
I think this is an bug caused by GUI. I've tried to edit ui/skin.png but doesn't work.
#8
It would be nice if we could choose to have it or not.
#9
Support / Client Error
Apr 22, 2017, 12:30 AM


Any solution?
#11
Applications / MySQL hosting
Jul 16, 2016, 11:57 PM
User Name: MatheuS
Email Address: [email protected]
What are you planning to do with this DB?: build a server
#12
Applications / BNC
Jan 20, 2016, 11:30 PM
User Name: MatheuS
Email Address: [email protected]
Network: LUNet
#13
Support / Hack - Across Walls
Dec 28, 2015, 09:49 PM
#14
#15
General Discussion / About XML
Aug 11, 2015, 08:45 PM
     I was realizing that many people have difficulty with adding objects, vehicles and other things using XML, as there other tools for vice city multiplayer created by @Thijn.

Why not create some tools to help you create XML files?

example: Click Here
#18
General Discussion / ERROR sockets04rel64
Jun 16, 2015, 09:37 PM


 ???
#19
General Discussion / About Hacker's
May 27, 2015, 12:13 PM
A few days ago I realized that some players were using hackers as aimbot, speed, flying and others, I sent a message to the stormeus but there was no answer, I spoke to maxorator in the game and it was the same thing, I created this video to show that it's possible.

I have no intention of harming the game, is yes report so it can be resolved.

if you want to remove air from the video, please contact me I retreat immediately.

VIDEO:

removed -stormeus
#20
General Discussion / MySQL to MySQLi
Apr 25, 2015, 01:19 PM
With the change in MySQL to MySQLi will not affect the mysql04rel plugin?