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 - vcmptr

#1
Anyone know what happened to vcmp.liberty-unleashed.co.uk? It's only shows blank page.
#2
Bugs and Crashes / Run on the ground
Jan 21, 2017, 08:21 PM
When i crush someone with a car they are falling but still running.
www.youtube.com/watch?v=KGUeV-EJf-M
#3
If I want see all servers I must refresh list few times. Please watch the video.
https://youtu.be/SIjY0-ik6Yo
#4
Can I get HTTP page content using sockets? I don't know how to use socket but if it's possible I will try learn use sockets.
#5
Snippet Showroom / [Temporary] Print Slicer
Jul 22, 2015, 11:14 AM
This bug still not fixed. I can't wait for fix. I created temporary print function.

function PrintSlicer()
{
local PrintBackup = print;
print <- function(string)
{
if(string!=null)
{
string = ""+string+""
if(string.len()>512)
{
  local x = string.len()/512;
  local cpt = 0;
  for(local i = 0; i != x; i++)
{
   cpt += 512;
   PrintBackup(string.slice(cpt-512, cpt));
}
  PrintBackup(string.slice(cpt, (cpt+(string.len()%512))));
  PrintBackup("Sliced prints ("+(x+1)+" slices) ");
}
 else PrintBackup(string);
}
}
}
How to apply?
Just call function in onScriptLoad.
#6
Can I track Vice City's objects?
#7
Off-Topic General / MyISAM or InnoDB
Jun 16, 2015, 03:34 PM
I'm creating users table on MySQL. Table contains passwords, usernames, stats and register dates.
Which one should I use?
#8
Closed Bug Reports / NewTimer with Table
Jun 01, 2015, 04: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:
function onScriptLoad()
{
local table = {};
NewTimer("TimerTest", 1000, 1, table);

}


function TimerTest(table)
{
print(type(table));
print("Testing");
}
But does not happen anything.
#9
How can I get microsecond with Squirrel?
Like this: 1433076209 0.35124300
#10
I need sleep like PHP sleep function. How can I do with Squirrel?
#11
What's your favorite Vice City radio?
#12
Closed Bug Reports / Program Compatibility
Apr 11, 2015, 01:21 PM
If I choose any program compatibility mode for gta-vc.exe I can't join servers.
#13
I'm trying to create scheduled tasks. 
function tasks()
{
NewTimer("tasks",60000,1);
local now = date()
if(now.hour.tointeger() == 00)
{
SetWeather( 7 );
}
if(now.hour.tointeger() == 06)
{
OffCarLights();
}
if(now.hour.tointeger() == 18)
{
SetWeather( 5 );
}
if(now.hour.tointeger() == 20)
{
OpenCarLights();
}

}

But its not useful.  Example I can't schedule task from week to week. How can I make like Cron Job?
#14
I need unix time to date and date to unix time. How can i do?
#15
I wonder can I call squirrel function with PHP?
#16
If print() length greater than 514 characters server crashes.
I have try this:
print("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eie");
#17
General Discussion / MySQL or SQLite?
Mar 02, 2015, 05:38 AM
Which do you use?
#18
Snippet Showroom / [MySQL] Error Logger
Mar 02, 2015, 02:20 AM
This script logging errors to MySQL DB.
function errorlog( str )
{
local hata = "\n[Error]"+str+"\n Functions:\n"
local cs = {};
local now = date();

 
 for(local i = 2; i != null; i++)
 {
 if(getstackinfos( i ))
 {
 local fnad = getstackinfos( i );
 hata = hata+"["+fnad["func"]+"()] "+fnad["src"]+" ["+fnad["line"]+"]\n";
 }
else break;
 }
 
 for(local i = 2; i != null; i++)
 {
 if(getstackinfos( i ))
 {
foreach(idx,val in getstackinfos( i ))
cs[idx+i] <- val;
 }
else break;
 }
 
hata = hata + "Locals:\n"
 for(local i = 2; i != null; i++)
 {
 if(getstackinfos( i ))
 {
 local fnad = getstackinfos( i );
 foreach(idx,val in cs["locals"+i])
 hata = hata+"["+fnad["func"]+"]"+idx+", Value="+val+"\n";
}
else break;
}
print(hata);
mysql_query( YOUR_DB, "INSERT INTO errors (`error`, `date`) VALUES ( '" + mysql_escape_string(YOUR_DB, hata) + "', '" + (now.day + "/" + (now.month.tointeger() + 1) + "/" + now.year + " " + now.hour + ":" + now.min + ":" + now.sec) + "')" );
print( mysql_insert_id(YOUR_DB)+" error saved with this number." );
}
seterrorhandler( errorlog );


DB Create Table Query:
CREATE TABLE IF NOT EXISTS `errors` (
  `error` text NOT NULL,
  `date` text NOT NULL
);
ALTER TABLE errors ADD id INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;