• Welcome to Vice City Multiplayer.
 
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

Messages - VRocker

#91
Just knocked up a quick script which will do this for you :)
Its been optimised for speed so it may look a tad complicated but its really easy :)

Heres the script:

alias CalcOwnedCars {
  var %a = 1, %b, %id = 0
  var %name = $vcmp.name(%a)

  while ( %a < $ini( CarOwners.ini, CarOwners, 0 ) ) {
    %id = $ini( CarOwners.ini, CarOwners, %a )
    if ( %id ) {
      if ( $readini( CarOwners.ini, CarOwners, %id ) == %name ) {

        ; You may want to modify the %id bit below for vehicle names
        if ( %b ) %b = %b $+ , %id
        else %b = %id
      }
    }
    !inc %a
  }

  writeini "CarOwners.ini" ReadableCarOwners %name %b
}

on *:SIGNAL:vcmp.command:{
  var %name = $left($1,-1)
  var %id = $vcmp.getid(%name)
  var %a = $iif($3,$iif($3 !isnum,$iif($vcmp.getid($3) != Unknown,$v1,-1),$iif($vcmp.name($3) != Unknown,$3,-1)),%id)

  if ( $2 == !buycar ) {

    ; DO YOUR FUNKY BUYCAR STUFF HERE

    var %vehicleid = $vcmp.vehicle(%a,id)
    ; Lets store it in an internal format. This will be used for calculating other stuff aswell as selling
    writeini "carowners.ini" CarOwners %vehicleid %name

    CalcOwnedCars %id

  }
  elseif ( $2 == !sellcar ) {

    ; DO YOUR SELL CAR STUFF HERE!

    var %vehicleid = $vcmp.vehicle(%a,id)
    ; Lets store it in an internal format. This will be used for calculating other stuff aswell as selling
    remini "carowners.ini" CarOwners %vehicleid

    CalcOwnedCars %id
  }

  elseif ( $2 == !mycars ) {

    ; DO SOME CHECKING N OTHER FUNKEH STUFF

    ; NOTE - The next line will only output owned vehicle ID's, change it to add names
    ; NOTE 2 - To change it for names, modify the CalcOwnedCars alias!
    vcmp.msg %id Your Vehicles: $readini( CarOwners.ini, ReadableCarOwners, %name )

  }
}


Although its not been tested... it should work fine. Lemme know if it doesn't work
#92
mIRC/pawn Scripting / Re: !say %name xD
July 09, 2008, 01:26:58 PM
What revillo said may work but mirc may thing your giving it an empty variable (similar to when you do a $ on its own.

Try adding this...


on *:TEXT:*:#:{
if ( $chr( 37 ) isin $1- ) {
kick $chan $nick Feck Off! :)
}
}


The $chr will stop mirc parsing as a var.
Oh and as windlord said... i dont think this bug exists in my dll but i cannot confirm as i have not personally tested it.
#93
Ooo nice script :) Not tried it personally but it sounds cool :)
Glad to have helped out a lil bit on this too :)

Well done ;D
#94
All commands need the $1 parameter. This is used to do multiple things to multiple servers.

Heres the fixed code:
on *:SIGNAL:vcmp.player.command2:{
  ; $1 = ServerID, $2 = PlayerID, $3 = Command, $4- = Params
  vcmp.addchat $1 $vcmp.name( $1, $2 ) $+ : /c $3-

  if ($3 == sethp) {
    if (!$4) vcmp.msg $1 $2 Error - Missing Information, $3 <name> <amount>
    elseif (!$5) vcmp.msg $1 $2 Error - Missing Information, $3 <name> <amount>
    elseif ($4 == -1) vcmp.msg $1 $2 Error - Invalid ID/Name
    else {
      vcmp.sethp $1 $4 $5
      vcmp.say $1 Setting HP on: $4 To Amount: $5 $+ % By Admin: $2
    }
  }
!.signal vcmp.command2 $strip( $1- )
}


Also for reference, see my scripts Here

Edit: Also just noticed you using Elseif's without a starting if. You must have an if before an elseif within the same set of brackets
#95
mIRC/pawn Scripting / Re: Bad language
June 24, 2008, 02:19:45 PM
Cant give you the exact code without knowing what base script your using... But heres the main part you need:

if ( $findtok( fuck shit bastard, $2-, 1, 32 ) ; Warn User

$2- would be the whatever the player said. In my scripts it would be $3- under vcmp.chat.
Sorry i cant give you the code for the other scripts, havn't got access to their signals/parameters right now (Somebody wanna grab them for me? :))

More words can be added by seperating each 'bad word' with a space
#96
mIRC/pawn Scripting / Re: Commands !Ban
June 20, 2008, 01:03:10 PM
Try this (It may need some work since it wasn't originally made for the GUS, should be fine though):
on *:TEXT:!*:#:{
if ( $1 == !ban ) {
    if ( $nick isop $chan ) {
      if ( $2 ) {
        var %id = $iif( $2 isnum, $v1, $vcmp.nameid( $2 ) )
        if ( %id != 255 ) {
          vcmp.adminchat ** Admin:[ $nick ] Banned:[ $vcmp.hgetname( %id ) ] Reason:[ $iif( $3-, Reason: $v1, No Reason ) ]
          vcmp.ban %id
        }
        else !.notice $nick Error: Invalid Player
      }
      else !.notice $nick Error: You must say who to ban
    }
  }
}


This will also work for banning IDs aswell as names :)

Oh yeh, and if you want to use the command on the client the scripts are running on, remeber to change on *:TEXT:!*:#:{ to on *:INPUT:#:{
#97
Script Showroom / GameMonkey & LUA for VC-MP 0.3z
June 19, 2008, 12:57:32 PM
Not sure if this should be posted here or in the mIRC scripting section.... but feel free to move it :)

Heres something i've been making when i've wanted to get away from my other projects.
It allows you to create GameMonkey and LUA scripts for VC:MP 0.3z. It has the ability to connect to 50 servers at once and load as many GameMonkey/Lua scripts as you want, aswell as being able to run both GM and Lua scripts at the same time.

Included in the zip file is some example scripts for both lua and GameMonkey aswell as a list of commands and events so you can create your own scripts.
GameMonkey also comes with SQLite and XML support which i have yet to add to lua, but you can create a lua script to work with the GM functions.

Heres the link anyway: http://liberty-unleashed.co.uk/VCMP.zip

Please post your suggestions and feedback :)

NOTE: This application requires the Visual C++ 2005 SP1 Runtime Files. If it doesn't work, go download it! (Can be found Here)

Also please remember to fill in the config file with your server details else it will crash and burn!
#98
Script Showroom / Re: New VC-MP mIRC Admin
June 19, 2008, 12:42:05 PM
I decided to release my half made scripts that utilise this better. I currently use them on my server but are not finished.

It features a basic admin system, aliases for things that were going to be implimented in the future, an IRC echo aswell as custom areas, cash, bank and a few other things.

This would be great for somebody who wants the basics. and it would be great if anybody wanted to build ontop of these to finish them off :)

On a small note, they are a bit messy and some parts are a bit complicated cuz i kept forgetting parts i had already coded :P

Anyway, heres the scripts: Clicky

Just load all the files into mirc and change the channel name in IRC.mrc. It also needs a config file being created under VCMP/INIs named vcmp.config.ini with the following entries:

[MAIN]
Active=1

[CONFIG]
Admin=1
Reg=1
Cash=1
Property=1
Vehicle=1


Without this confi file everything will be turned off
#99
Support / Re: Very wierd problem...
April 25, 2008, 09:30:35 AM
Where exactly is gta-vc.exe located? Normally its in 'C:\Program Files\Rockstar Games\Grand Theft Auto Vice City'

Looks to me that your pointing VC-MP to the disk and not the directory. Point it to where the EXE is and it should work fine.

When it asks to locate it, just select the directory since the exe wont show up (if i'm remembering the selection right) so if its in the normal place, select the 'Grand Theft Auto Vice City' folder
#100
Script Showroom / Re: New VC-MP mIRC Admin
April 02, 2008, 09:08:48 AM
Updated the DLL again. Seems there was a wierd crash which caused mirc to exit unexpectantly.
Also there was a DLL unload bug which sometimes caused mIRC to error on exit or die on dll unload

Both of these have been fixed :) Also eliminated the need to call Startup before using the dll

-

Another Update:

Fixed a problem with pickups. Accidently defined them as a byte which caused the types to mess up :P
Made the Interior option in SetLocation optional. It'll default to 0 if its not set now :)

Big thanks to AdTec_224 for finding all the problems!
#101
Script Showroom / New VC-MP mIRC Admin
March 31, 2008, 02:36:37 AM
Heres a shiney new script and DLL for you all to use!

Decided to recreate the VC-MP mIRC dll due to the hacky method that had to be used to retrieve data from the server and keep it connected.
The dll handles all the network connections, incoming data etc and parse the data. so no more if ($1 == [join]) :)

The script has been designed to give the user the minimum needed. A dialog and the signals that the DLL calls when data is retrieved.
The dialog has been designed to be similar to MTA:MA and features kick, ban, pm, slap and kill buttons.
It also has the ability to connect to multiple servers at the same time :)

Some benefits of using this include:

  • Faster data execution
  • More features
  • Easier to use
  • Nice dialog to monitor chat and manage the server

...:Usage:...
1) Place the 'vcmp.mrc' and the 'vcmp.dll' in your mIRC directory
2) Open up mIRC and load the script by typing /load -rs vcmp.mrc
3) The main dialog will then be displayed. Fill in your server IP, Port and Password in the appropriate fields and click 'Connect'
4) Your done! The script is now connected and you are ready to create your own scripts.

Functions and callbacks are in the ReadMe. Theres too many to list here.

Anyway, Grab it HERE

Please post any suggestions and any bugs encountered :)
#102
General Discussion / Re: Multi for GTA 3
July 03, 2007, 05:57:37 PM
A new MP mod for GTA3 would be great! LC-MP isn't that popular (personally i dont like GTA:LC but that may be because its only ever worked once) but a lot of people miss the classic GTA3 feel. I know i do!

MTA 0.5 for GTA3 fulfilled our needs for a while but now its just full of cheaters and the bugs are really annoying now we are used to better mods like VC-MP ;)

But, like VG said, GTA3 is a LOT differant from VC in the way it works. The majority of the VC-MP core would have to be re-written to work with GTA3.

Shame really :(