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.

Messages - vcmptr
16
Off-Topic General / Re: Vcmp Vs Samp!
« on July 6th, 2015, 04:21 PM »
I like VC-MP as player.
17
Scripting and Server Management / Re: MySQL not connecting
« on July 2nd, 2015, 05:54 PM »
Are you sure port is correct?
18
Scripting and Server Management / Re: Can I Track Default Objects?
« on June 27th, 2015, 03:39 PM »
Thanks all for replies.
19
Scripting and Server Management / Can I Track Default Objects?
« on June 26th, 2015, 04:12 PM »
Can I track Vice City's objects?
20
Scripting and Server Management / Re: Register Problem
« on June 24th, 2015, 10:42 PM »
Quote from imran on June 24th, 2015, 09:04 PM
Code: [Select]
function register(player,text)
{
QuerySQL( db, "INSERT INTO Accounts (Name,Password,Level,RegisterDate,LastLogin,Cash,Bank,IP,Country) values( '"+player.Name+"','"+text+"','1', '"+GetFullTime()+"', '"+GetFullTime()+"','2000','0','"+player.IP+"','"+IpToCountry( player.IP )+"','0','0','0','0','0','0','0','0')");
QuerySQL( db, "INSERT INTO KD ( Name,Kills,Deaths) VALUES ( '" + player.Name +"','0','0' )" );
player.Cash = 2000
}
if ( cmd == "register" )
{
                 local q = QuerySQL( db, "SELECT * FROM Accounts WHERE rowid LIKE '" + text + "'" );
if ( binfo[player.ID].registered==true ) MessagePlayer("[#FF0000]Error:[#F7FE2E]You Are Already Registered"player);
                 else
{
                if ( text )
              {
MessagePlayer("[#F7FE2E]You have registered your nickname, Password - " + text, player);
register(player,text);
                      binfo[player.ID].registered=true;
binfo[player.ID].logged=true;
       
}
else MessagePlayer( "[#FF0000]Usage: [#F7FE2E]/" + cmd + " <Password>", player );
}
}
function onScriptLoad()
{
QuerySQL( db, "CREATE TABLE IF NOT EXISTS Accounts ( Name VARCHAR(32),Password VARCHAR(25),Level VARCHAR(32), RegisterDate TEXT, LastLogin TEXT,Cash INT(15),Bank INT(15),IP VARCHAR(25),Country VARCHAR(25))" );
}
I think your SQL query wrong.
21
Off-Topic General / MyISAM or InnoDB
« on June 16th, 2015, 04:34 PM »
I'm creating users table on MySQL. Table contains passwords, usernames, stats and register dates.
Which one should I use?
22
Off-Topic General / Re: Scripting challenges!
« on June 10th, 2015, 02:08 PM »
(click to show/hide)
function PrintArray(array, num=0)
{
print(array[num]);
num+=1;
if(array.len() != num) PrintArray(array, num);
}
23
Closed Bug Reports / Re: NewTimer with Table
« on June 1st, 2015, 05:48 PM »
Quote from Doom_Killer on June 1st, 2015, 05:37 PM
I don't know if this is wrong or right, but if I had to make something like that I will do:

Code: [Select]
function onScriptLoad()
{
        table <- {};
        NewTimer("TimerTest", 1000, 1);
}

function TimerTest(table)
{
        print(type(table));
        print("Testing");
}
But you are not send table.
24
Closed Bug Reports / NewTimer with Table
« on June 1st, 2015, 05:26 PM »
Firstly I don't know it's whether bug. I might be doing something wrong.
NewTimer function not working with table arg.

I'm trying it:
Code: [Select]
function onScriptLoad()
{
local table = {};
NewTimer("TimerTest", 1000, 1, table);

}


function TimerTest(table)
{
print(type(table));
print("Testing");
}
But does not happen anything.
25
Scripting and Server Management / Re: How Can I Get Microsecond
« on May 31st, 2015, 02:35 PM »
Yes, I meant this. Thanks. :)
26
Scripting and Server Management / How Can I Get Microsecond
« on May 31st, 2015, 01:46 PM »
How can I get microsecond with Squirrel?
Like this: 1433076209 0.35124300
27
Scripting and Server Management / Re: How To Sleep
« on May 25th, 2015, 05:24 PM »
Quote from S.L.C on May 25th, 2015, 04:43 PM
There's a reason that scripting languages with interests towards games don't have the sleep function. Because I'm not sure how you think the sleep function works but it basically means halt my program here for this amount of time. And then your server would simply stop for that amount of time. I'm sure you've seen some server having glitches from time to time. Especially when they have a poor database implementation with SQLite. The server simply stops for a moment until the data is fetched or inserted into the database. Same thing happens with the sleep function. I'm sure you remember the issue with screenshots freezing the game. That's another effect that demonstrates how the sleep function would affect the game.

It would take only a few seconds to expose the sleep function from C/C++ to Squirrel. But that wouldn't help anyone.
Thanks for explain. :) I thought to generate random numbers.
28
Scripting and Server Management / Re: How To Sleep
« on May 25th, 2015, 04:24 PM »
Quote from Murdock on May 25th, 2015, 12:16 PM
I don't think Squirrel has a function like that, but you can achieve the same by using timers or coroutines
Quote from Thijn on May 25th, 2015, 04:18 PM
I would like to add that the sleep function in PHP actually halts everything. Doing this in Squirrel will mean your server will stop responding to events and whatnot. Which causes a massive lagspike.

Using timers is the way to go if you would like to get a similar feature.
Thanks. :) I will use timers.
29
Scripting and Server Management / How To Sleep
« on May 25th, 2015, 07:51 AM »
I need sleep like PHP sleep function. How can I do with Squirrel?
30
General Discussion / Re: Wiki multi language support
« on May 16th, 2015, 06:57 PM »
I agree with you. And I hope server browser can support multi language.