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 ... 5
1
mIRC/pawn Scripting / Re: How To Make My Owns Commands
« on: March 07, 2009, 11:43:03 pm »
Check this topic, it may help you
http://forum.vicecitymultiplayer.com/index.php?topic=1042.0

after learning how to script basic commands like !hp, you can move on to more advanced commands like !sus

2
mIRC/pawn Scripting / Re: Getting server info from Website...
« on: March 07, 2009, 07:15:11 pm »
yo,

To retrieve all the servers on the server list, it uses the TCP protocol.
http://38.103.164.119/servers.php

(to query an individual server uses UDP)

the following should connect to the site and echo all the servers (including the headers received from the server)
(alot easier to read in the source as the servers are seperated by \n's)

Code: [Select]
<?php
$host "38.103.164.119";
$port 80;

$sock fsockopen($host$port$errorid$error30);
if (!$sock) die("Could not open socket to mast server list, errorid='$errorid' error='$error'");

$packet "GET /servers.php HTTP/1.1\r\n";
$packet .= "Content-Type: text/html\r\n";
$packet .= "Host: 38.103.164.119\r\n";
$packet .= "Accept: text/html, */*\r\n";
$packet .= "User-Agent: Mozilla/3.0 (compatible; VC:MP v0.3z BETA)\r\n";
$packet .= "\r\n";

fwrite($sock$packet);

while (!feof($sock)) {
echo fgets($sock128);
}

fclose($sock);
?>


3
mIRC/pawn Scripting / Re: InVaLiD NiCk..
« on: March 07, 2009, 06:58:44 pm »
nice explanation man,

about what i said, i must have been thinking of a more advanced expression like the last one you posted

4
mIRC/pawn Scripting / Re: InVaLiD NiCk..
« on: March 04, 2009, 04:34:57 pm »
Indeed we were.

I can remember along time ago when I was having problems with brackets,
and I tried all possible bracket solutions for the statement, and the only one which worked was when I added an extra pair of ( )

So from now on I've always added them when I have a statement with more than 1 condition, and it's never let me down.

So unless you know when to add them or not, in my opinion it's best to add them anyway.

I'm assuming you know when to add them, perhaps you could explain?

5
mIRC/pawn Scripting / Re: InVaLiD NiCk..
« on: March 03, 2009, 08:19:11 pm »
lol you don't need that extra bracket.

Sometimes you do sometimes you dont.

6
mIRC/pawn Scripting / Re: InVaLiD NiCk..
« on: March 02, 2009, 09:45:11 pm »
also you should put an extra pair of ( ) brackets around the massive conditional statement ;)

Code: [Select]
if (($len($3) < 3) || ($left($3,1) isnum) || ($chr(35) isin $3) || ($chr(36) isin $3) || ($chr(37) isin $3) || ($3 == none)) {
  vcmp.say *** $3 has been auto-kicked. [Invalid Nick]
  vcmp.announce %id ~y~Please change your nick-name..
  .timer 1 2 /vcmp.kick %id
}

7
mIRC/pawn Scripting / Re: i can't load manhunt.mrc
« on: February 25, 2009, 03:07:24 pm »
Try loading the script this way:
open mirc
Tools > Scripts Editor
Remote tab
File > Load
* find the script * and click on it
Open

8
mIRC/pawn Scripting / Re: Plz help my auto-drown!
« on: February 22, 2009, 05:38:09 am »
You need to specify which player you want to set the location of.

If you want to drown the killer, change
Code: [Select]
vcmp.setlocation -485.562 -777.406 205.796to
Code: [Select]
vcmp.setlocation %killer -485.562 -777.406 205.796

9
mIRC/pawn Scripting / Re: help in "config of vehicles "
« on: February 17, 2009, 06:38:05 am »
z_angle is the angle on the Z co ordinate in degrees (0 to 360) might be -180 to 180, cant remember..

basically it's the angle that the vehicle will be facing, eg. you may want it facing north or south etc

10
mIRC/pawn Scripting / Re: How can i show this? + Random Question
« on: February 11, 2009, 04:32:12 pm »
Is it maybe becouse i am the only one in the server?

That probably isn't the problem.


The reason it is always saying "Unknown" as the name is because in this line:
Code: [Select]
.timer 1 20 vcmp.cmdsay $2 %id The choosen player is: $vcmp.name($vcmp.randomid)
The $vcmp.randomid alias is not returning the correct value.

It may not be returning the correct value because it might not be finding the alias.
Make sure that you have a script loaded with the alias inside it.

Also try pressing 'Control' and 'h' in the mirc scripts editor, which will properly align all the code in that script with indentation, and inform you of any { and } bracket errors.

If it says you have bracket errors, then try placing the code in another blank script for the alias to work, or fix the bracket errors :p


Also it could be a bug in the vcmp.randomid alias i guess, but i cant see anything wrong with it :s

11
mIRC/pawn Scripting / Re: How can i show this? + Random Question
« on: February 10, 2009, 07:38:02 pm »
There's a problem with thijn's Alias.

Remove the last } ;)

12
mIRC/pawn Scripting / Re: How can i show this? + Random Question
« on: February 09, 2009, 11:20:14 pm »
jus to confirm; the code thijn posted should be put inside the Remote tab in mirc, and outside the scope of any other alias's or events.

this error that your getting:
Code: [Select]
* /vcmp.check.ini: not connected to server (line 33, vcmp.mrc)means that on line 33 in vcmp.mrc, mIRC attempted to call an alias called "vcmp.check.ini",
however it could not find the alias in any scripts that you have loaded.

possiby you have removed some code which contained this alias? or are missing an enite script?

13
mIRC/pawn Scripting / Re: How can i show this? + Random Question
« on: February 09, 2009, 12:04:00 am »
It needs to be added inside the vcmp.command signal if your using GUS 9.0.

try this

Code: [Select]
on *:SIGNAL:vcmp.command:{
  if ($2 == !badplayer) {
    var %a = 0, %b = $vcmp.maxplayers, %c, %randomid
    while (%a < %b) {
      if ($vcmp.name(%a) != Unknown) { %c = $addtok(%c, %a, 32) }
      !inc %a
    }
    if (%c == $null) { ;no players in server }
    else {
      %randomid = $gettok(%c, $rand(1, $numtok(%c, 32)), 32)
      ; the %randomid variable contains a random player id
    }
  }
}

14
mIRC/pawn Scripting / Re: How can i show this? + Random Question
« on: February 08, 2009, 09:28:17 pm »
i think ~b~ was also one, blue i think

15
mIRC/pawn Scripting / Re: Please help
« on: February 08, 2009, 06:11:05 am »
just fort i'd mention, as you've got more than 1 condition in your elseif statement, you should put an extra set of ( ) around the first and last condition.

so
elseif (!levelupapp* iswm $2) || (!pmlevelupapp* iswm ?2) {
should be
elseif ((!levelupapp* iswm $2) || (!pmlevelupapp* iswm ?2)) {


even though the way you had it may work, that is the way it should be done ;)

Pages: [1] 2 3 ... 5