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

Pages: 1 2 [3] 4 5
31
Support / Re: I can't find my server
« on: February 17, 2008, 06:59:10 pm »
If you are running the server on the same computer that you are connecting to using the client, you (and only you) should use the ip 127.0.0.1, anyone else who is not on your network should use your external ip (http://www.whatsmyip.org/)

32
mIRC/pawn Scripting / Re: Help! Server Xtras
« on: February 13, 2008, 07:01:05 pm »
Hey here's an update for the 'part or nick' alias:

Code: [Select]
$vcmp.partofnick($vcmp.name(%id))
Code: [Select]
alias vcmp.partofnick {
  var %a = 1, %b = $1, %c, %d, %e, %f, %g, %h
  while (%a <= $len(%b)) {
    %c = $mid(%b,%a,1)
    if (%c == $chr(40)) { %d = $v2 | %e = $chr(41) | !break }
    elseif (%c == $chr(91)) { %d = $v2 | %e = $chr(93) | !break }
    !inc %a
  }
  %f = $pos(%b,%d,1) | %g = $pos(%b,%e,1)
  if ((!%d) || (!%f) || (!%g)) { !return }
  %h = $mid(%b,%f,$calc((%g - %f) + 1))
  !return $iif($len(%h) > 2,%h)
}

It will work for nicks like:
[XX]Testing Test[XX]ing Testing[XX] (XX)Testing Test(XX)ing Testing(XX)

33
mIRC/pawn Scripting / Re: Help! Server Xtras
« on: February 13, 2008, 12:09:12 am »
Thanks! :)

But... need some little things

1. cannot start with number

np, hope this works too.

Code: [Select]
on *:SIGNAL:vcmp.join:{
  var %name = $1, %id = $vcmp.getid(%name)
  var %a = 1, %b = @ / & % * !
  if ($left(%name,1) isnum) { vcmp.kick %id }
  while (%a <= $numtok(%b,32)) {
    if ($gettok(%b,%a,32) isin %name) {
      vcmp.kick %id
    }
    !inc %a
  } 
}

2. with ( and ) characters

$vcmp.partofnick($vcmp.name(%id),$chr(40),$chr(41))

34
mIRC/pawn Scripting / Re: Help! Server Xtras
« on: February 12, 2008, 11:19:50 pm »
1. How may I make it that the nickname may not contain @,/,&,%,*,! and other characters? (kick)

Hey mbalee,
Just put the characters after the "%b = " bit, hope it works.

(A regular expression could probably do this better, but I don't know them.)

Code: [Select]
on *:SIGNAL:vcmp.join:{
  var %name = $1, %id = $vcmp.getid(%name)
  var %a = 1, %b = @ / & % * !
  while (%a <= $numtok(%b,32)) {
    if ($gettok(%b,%a,32) isin %name) {
      vcmp.kick %id
    }
    !inc %a
  } 
}

2. How I may have it read through only the parenthesis and the characters in him?
exampl: [VcMp]Testplayer the nick and only need [VcMp]

Remember to put this alias outside any signal brackets (scope).

Code: [Select]
alias vcmp.partofnick {
  var %name = $1, %pos1 = $pos(%name,$2,1), %pos2 = $pos(%name,$3,1)
  !return $mid(%name,%pos1,%pos2)
}

And heres the identifier to use:
Code: [Select]
$vcmp.partofnick($vcmp.name(%id),[,])

35
mIRC/pawn Scripting / Re: Skins
« on: February 02, 2008, 10:49:15 am »
Can this also with skins?

That depends if the skin id is sent from the server to the script when the player spawns.
You can test this by doing the following.

In the vcmp.data alias look for this code:
Code: [Select]
elseif ($1 == [spawn]) {

}

Then add "echo -s $1-" inbetween the curly brackets:
Code: [Select]
elseif ($1 == [spawn]) {
  echo -s $1-
}

Now go ingame and spawn as any skin, and in the main mIRC window you should see "[spawn] something..".
If there is a number somewhere in the "something", it could be the skin id.
Try comparing it to your config skin id and the VC:MP skin id.

If the server does send the skin id to the script, then you can send that value to the vcmp.spawn signal.
Then you can use INI/Hash or whatever method you wish to store that value, which will be used for the !skin command.

If the server doesn't send the skin id to the script, there are other ways to get the !skin command working.

and.. is it possible to do with !weapons <Name/ID> to see which weapons (and ammo) the player have?

You can use the $vcmp.weapon(playerid) alias to get the player's current weapon.
You could try creating an alias which shows all the player's weapons.
Such as, when a player picks up a weapon pickup, store the player id/name, wep id/name and ammo/default ammo amount somewhere.

I can think of a few problems with this though.
If someone buys a weapon at a weapon shop, I don't think the server sends any message to the script.
If someone shoots and runs out of ammo, again I don't think the server sends any message to the script.

36
mIRC/pawn Scripting / Re: Question from friend (he doesn't know english)
« on: January 31, 2008, 05:20:21 pm »
If you're using this script, then try this

Code: [Select]
on *:SIGNAL:vcmp.command:{
  if ($2 == !masskill) {
    var %a = 0
    while (%a <= 50) {
      if ($hget(vcmp,%a $+ .name) != $null) { vcmp.sethp %a 0 }
      !inc %a
    }
  }
}

Replace 50 with the max players allowed in your server.

37
mIRC/pawn Scripting / Re: Need help with add BOT to script
« on: January 31, 2008, 05:17:39 pm »
I dont know much about bots, but why cant the bot connect to the server like a script?
Then make sure in the config.ini file for the server, 'RconMaxUsers' is set to 2 or more.

38
mIRC/pawn Scripting / Re: Only 1 little question! :D
« on: January 30, 2008, 08:29:44 am »
Oh I see in your picture that you have stored the vehicle model ids and not the vehicle ids related to your config.ini file.

The only way I can think to get a player's vehicle model id, is from when they enter a vehicle.

If you feel you can add the code inside the 4 signals to the 4 signals in your script, and add the 2 alias's to your script, then do so.
Otherwise just put these 4 signals and 2 alias's into a new blank script.

The reason for this is you cannot have 2 of the same signal names in the same script, and I am assuming that you already have these 4 signal names in your script.

Code: [Select]
on *:SIGNAL:vcmp.enter:{
  var %name = $1, %id = $vcmp.getid(%name)
  !hadd -m vcmp %id $+ .carmodelid $3
}
on *:SIGNAL:vcmp.exit:{
  var %name = $1, %id = $vcmp.getid(%name)
  !hdel vcmp %id $+ .carmodelid
}
on *:SIGNAL:vcmp.kill:{
  var %name = $2, %id = $vcmp.getid(%name)
  !hdel vcmp %id $+ .carmodelid
}
on *:SIGNAL:vcmp.part:{
  var %name = $1, %id = $vcmp.getid(%name)
  !hdel vcmp %id $+ .carmodelid
}
alias vcmp.carmodelid !return $iif($hget(vcmp,$1 $+ .carmodelid) != $null,$v1,-1)
alias vcmp.carname !return $iif($readini(vcmp.data.ini,cars,$vcmp.carmodelid($1)) != $null,$v1,Unknown)

And here is the other code

Code: [Select]
elseif ($2 == !car) || ($2 == !pmcar) {
    if ($vcmp.cmdcheck(!car,%id) == fail) !halt   
    elseif (%a == -1) vcmp.msg %id Error - Absent ID/Name
    elseif ($vcmp.vehicle(%a,id) == 0) vcmp.msg %id Error - $vcmp.name(%a) is currently on foot!
    else vcmp.msg %id Vehicle - Name: $vcmp.carname(%a) , ID: $+($chr(91),$vcmp.vehicle(%a,id),$chr(93)) , Damage: $+($chr(91),$calc(100 - $vcmp.vehicle(%id,hp)),%,$chr(93)) $+
  }

Hope it works,
Mex

39
mIRC/pawn Scripting / Re: Four NEW questions
« on: January 29, 2008, 07:45:19 pm »
2. Ok it work in !brb command, but where write it in !anmsg command?

Change
Code: [Select]
vcmp.announce %a $4to
Code: [Select]
vcmp.announce %a $4-
1. I don't understand can you write all /c report command for me?

Code: [Select]
on *:SIGNAL:vcmp.command2:{
  var %name = $1, %id = $vcmp.getid(%name)
  if (!report* iswm $2) || (!pmreport* iswm $2) {
    if ($vcmp.cmdcheck(!report,%id) == fail) !halt
    elseif ($4 == $null) vcmp.msg %id Error - Missing Information, $2 <name> <reason>
    else {
      vcmp.msg %id You sent report, Thanks you for your support!
      !write vcmp.report.ini $vcmp.name(%a) - $4-
    }
  }
}

If that doesn't work try replacing
Code: [Select]
  var %name = $1, %id = $vcmp.getid(%name)with
Code: [Select]
  var %id = $1, %name = $vcmp.name(%id)

40
mIRC/pawn Scripting / Re: Four NEW questions
« on: January 29, 2008, 04:21:44 am »
1. How to make pm commands? I did !report but i want to make same as it's on LW /c report because it's very very good idea.

If you're using the GUS script by Tommis the signal name for /c commands is 'vcmp.command2', so:

Code: [Select]
on *:SIGNAL:vcmp.command2:{
  ;$1 = nick or id, cant remember
  ;$2 = first word
}

I wanna know how to make to don't need use some hyphens as " _ " so i wanna example !anmsg szostol stop spamming on chat

Put a dash on the end of the $4 identifier, (or whichever identifier you are using to refer to the "text"), such as $4-
"$4-" is the same as "$4 $5 $6 $7 $8" etc etc, but in one identifier.

41
mIRC/pawn Scripting / Re: Only 1 little question! :D
« on: January 29, 2008, 04:12:47 am »
Make sure there is a space to the left and right of the alias, this would not work:
Name:$vcmp.carname($vcmp.vehicle(%a,id)),

This would:
Name: $vcmp.carname($vcmp.vehicle(%a,id)) ,

This would also work:
Name: $vcmp.carname($vcmp.vehicle(%a,id)) $+ ,

$+ removes the space btw

42
mIRC/pawn Scripting / Re: Only 1 little question! :D
« on: January 28, 2008, 12:03:01 pm »
Look this picture! :P :P :P  :-\

http://www.bsweb.extra.hu/command.JPG


(this is the "little" question!) :D

$vcmp.carname($vcmp.vehicle(%a,id))

43
Vice City / Re: Commands Admin In Server That It Does Not Have Commands
« on: January 26, 2008, 05:50:12 am »
I could not make anything. Please check up my actions. I have opened config.ini and have found there line Vehicle = 191 338.6310-237.6571 29.1708 98.9897 0 0; consitepcj1. In Rcon I write set 8 191 30 45 30. Machines on my place are not present after that. Help me please.  :'(

191 is the vehicle model id, when you use set. you are supposed to use the config id.
Lets say your config looked like this:
Vehicle = 191 338.6310 -237.6571 29.1708 98.9897 0 0 ; consitepcj1
Vehicle = 191 337.6310 -237.6571 29.1708 98.9897 0 0 ; consitepcj2
Vehicle = 191 336.6310 -237.6571 29.1708 98.9897 0 0 ; consitepcj3
Vehicle = 191 335.6310 -237.6571 29.1708 98.9897 0 0 ; consitepcj4
Vehicle = 191 334.6310 -237.6571 29.1708 98.9897 0 0 ; consitepcj5

The first vehicle you setup in the config.ini will be represented as ID 1 when using set. (This is the one in red text)
ID 2 is the one in blue text.
etc etc

44
Vice City / Re: Commands Admin In Server That It Does Not Have Commands
« on: January 24, 2008, 08:51:46 am »
I'm enter it in rcon for example set8 40 30 45

You must put a space between set and 8
Also you must specify a z location, which is the altitude

For example:
set 8 40 30 45 30

Remember 40 represents the vehicle id from your config.ini file. (id 1 is the first vehicle you have set in your config.ini file, id 2 is the 2nd, etc)

Pages: 1 2 [3] 4 5