Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Script Showroom => Topic started by: Tommis on June 12, 2007, 06:56:44 AM

Title: Computer Information Script
Post by: Tommis on June 12, 2007, 06:56:44 AM
Hey,

Lets make this the first script to show off, yea! Even though the dll was not made by me..hm.

Alias Code -


alias vcmp.cpu {
  var %ram = $round($calc($dll(ProcInfo.dll,GetRam,memory) / 1023),0), %ramfree = $round($calc($dll(ProcInfo.dll,GetRam,memoryavail) / 1023),0), %ram.p $dll(ProcInfo.dll,GetRam,p100use), %ram.pfree $dll(ProcInfo.dll,GetRam,p100avail)
  var %ut.mir = $duration($calc($uptime(mirc)/1000),2), %ut.ser = $duration($calc($uptime(server)/1000),2), %ut.sys = $duration($calc($uptime(system)/1000),2)
  var %cpu.proc = $dll(ProcInfo.dll,GetCpu,.), %cpu.mnu = $dll(ProcInfo.dll,GetCpuVendor,.) %cpu.speed = $dll(ProcInfo.dll,GetCpuSpeed,mhz), %cpu.use = $dll(ProcInfo.dll,GetCpuUsage,.)
  vcmp.say Ram - Totall: %ram $+ MB $+ , Free: %ramfree $+ MB $+ , Free: %ram.pfree $+ %
  vcmp.say Uptime - mIRC: %ut.mir $+ , System: %ut.sys
  vcmp.say CPU - Type: $gettok(%cpu.mnu,1,32) $+ , Speed: $round($calc($gettok(%cpu.mnu,3,32) / 1000),2) $+ GHz $+ , Usage: %ram.p $+ %
}


Command Code -


  elseif (!comp* iswm $2) || (!pmcomp* iswm $2) {
    if (%timer.status) vcmp.say Error - This Command can only be used Once every 2 Seconds
    else {
      vcmp.cpu
      set %timer.status 1
      !timer 1 2 unset %timer.status
    }
  }


Uses the Procinfo.dll, you can download from mircscripts.org i believe it is

Cya,
Tommis
Title: Re: Computer Information Script
Post by: adamale on June 12, 2007, 10:52:14 AM
Tbh it's useless :P But anyway you and Vrocker did a really good job.

Thanks :)
Title: Re: Computer Information Script
Post by: Vecis on June 12, 2007, 03:42:20 PM
good, but PAWN is easier :/ anyway, good job ;)
Title: Re: Computer Information Script
Post by: Winky on June 12, 2007, 04:29:24 PM
PAWN easy?

I like the mIRC language
Title: Re: Computer Information Script
Post by: VercettiG on June 12, 2007, 04:57:36 PM
Depends on the complexity of the mIRC script. :P
Title: Re: Computer Information Script
Post by: Tommis on June 12, 2007, 06:11:46 PM
Hey,

Its not really useless, you can use this script for many others things.. =p (Atleast the dll and the alias)

Cya,
Tommis
Title: Re: Computer Information Script
Post by: kenny01 on June 13, 2007, 12:29:07 AM
Quote from: Vecis on June 12, 2007, 03:42:20 PM
good, but PAWN is easier :/ anyway, good job ;)
I don't think PAWNO is easier. I think you just don't know mIRC scripting.
Title: Re: Computer Information Script
Post by: adamale on June 13, 2007, 01:09:10 AM
Yeah, Pawn is more complicated language than mIRC Scripting.

In my opinion Pawn is harder to learn and to understand.
Title: Re: Computer Information Script
Post by: Pixels^ on June 13, 2007, 02:06:01 AM
It's different for everybody. I myself find Pawn easy and mIRC hard. I find C# easy and C++ hard. It's just how your brain wants to work with different languages.
Title: Re: Computer Information Script
Post by: Aaron on July 04, 2007, 01:49:36 AM
Where can I find a  PAWN tutorial..?
Title: Re: Computer Information Script
Post by: adamale on July 04, 2007, 02:33:08 AM
There are no PAWN tutorials for VC-MP yet.

http://wiki.sa-mp.com/wiki/PAWN_tutorial_1
http://wiki.sa-mp.com/wiki/PAWN_tutorial_2

http://wiki.amxmodx.org/index.php/Pawn_Tutorial
Title: Re: Computer Information Script
Post by: Aaron on July 04, 2007, 02:49:21 AM
Quote from: adamale on July 04, 2007, 02:33:08 AM
There are no PAWN tutorials for VC-MP yet.

http://wiki.sa-mp.com/wiki/PAWN_tutorial_1
http://wiki.sa-mp.com/wiki/PAWN_tutorial_2

http://wiki.amxmodx.org/index.php/Pawn_Tutorial



Thanks adamale :)
Title: Re: Computer Information Script
Post by: weedarr on July 14, 2007, 02:08:19 PM
hey i play sa-mp and i script using pawno and once you learn a few things other things are easy but im going to give vc-mp and mIRC scripting a try.

WeeDarr
Title: Re: Computer Information Script
Post by: Punjabi on September 16, 2008, 10:09:45 AM
Thanks i need this actually i am modifying GUS and WSV..... :-*
Title: Re: Computer Information Script
Post by: gamyster on November 25, 2008, 04:20:51 PM
Can someone convert it to WSV?
Title: Re: Computer Information Script
Post by: Amenine on November 27, 2008, 01:34:21 PM
Nice work rulk..

Regards
Amenine
Title: Re: Computer Information Script
Post by: thijn on January 04, 2009, 09:35:54 PM
Quote from: rulk on November 26, 2008, 11:43:18 AM

alias vcmp.cpu {
  var %ram = $round($calc($dll(ProcInfo.dll,GetRam,memory) / 1023),0), %ramfree = $round($calc($dll(ProcInfo.dll,GetRam,memoryavail) / 1023),0), %ram.p $dll(ProcInfo.dll,GetRam,p100use), %ram.pfree $dll(ProcInfo.dll,GetRam,p100avail)
  var %ut.mir = $duration($calc($uptime(mirc)/1000),2), %ut.ser = $duration($calc($uptime(server)/1000),2), %ut.sys = $duration($calc($uptime(system)/1000),2)
  var %cpu.proc = $dll(ProcInfo.dll,GetCpu,.), %cpu.mnu = $dll(ProcInfo.dll,GetCpuVendor,.) %cpu.speed = $dll(ProcInfo.dll,GetCpuSpeed,mhz), %cpu.use = $dll(ProcInfo.dll,GetCpuUsage,.)
  vcmp.say $1 Ram - Totall: %ram $+ MB $+ , Free: %ramfree $+ MB $+ , Free: %ram.pfree $+ %
  vcmp.say $1 Uptime - mIRC: %ut.mir $+ , System: %ut.sys
  vcmp.say $1 CPU - Type: $gettok(%cpu.mnu,1,32) $+ , Speed: $round($calc($gettok(%cpu.mnu,3,32) / 1000),2) $+ GHz $+ , Usage: %ram.p $+ %
}



  elseif (!comp* iswm $3) {
    if (%timer.status) vcmp.say $1 Error - This Command can only be used Once every 2 Seconds
    else {
      vcmp.cpu $1
      set %timer.status 1
      !timer 1 2 unset %timer.status
    }
  }

I think it must be somthing like:

alias vcmp.cpu {
  var %ram = $round($calc($dll(ProcInfo.dll,GetRam,memory) / 1023),0), %ramfree = $round($calc($dll(ProcInfo.dll,GetRam,memoryavail) / 1023),0), %ram.p $dll(ProcInfo.dll,GetRam,p100use), %ram.pfree $dll(ProcInfo.dll,GetRam,p100avail)
  var %ut.mir = $duration($calc($uptime(mirc)/1000),2), %ut.ser = $duration($calc($uptime(server)/1000),2), %ut.sys = $duration($calc($uptime(system)/1000),2)
  var %cpu.proc = $dll(ProcInfo.dll,GetCpu,.), %cpu.mnu = $dll(ProcInfo.dll,GetCpuVendor,.) %cpu.speed = $dll(ProcInfo.dll,GetCpuSpeed,mhz), %cpu.use = $dll(ProcInfo.dll,GetCpuUsage,.)
  vcmp.say Ram - Totall: %ram $+ MB $+ , Free: %ramfree $+ MB $+ , Free: %ram.pfree $+ %
  vcmp.say Uptime - mIRC: %ut.mir $+ , System: %ut.sys
  vcmp.say CPU - Type: $gettok(%cpu.mnu,1,32) $+ , Speed: $round($calc($gettok(%cpu.mnu,3,32) / 1000),2) $+ GHz $+ , Usage: %ram.p $+ %
}


and Command:

elseif (comp* iswm $3) {
if (%timer.status) vcmp.say Error - This Command can only be used Once every 2 Seconds
else {
vcmp.cpu
set %timer.status 1
!timer 1 2 unset %timer.status
}
}