Author Topic: How can i show this? + Random Question  (Read 11067 times)

0 Members and 1 Guest are viewing this topic.

Offline Zack

  • Street Thug
  • *
  • Posts: 17
  • My english is not good, my main language is Dutch.
    • View Profile
How can i show this? + Random Question
« on: February 08, 2009, 12:11:25 pm »
Hello


My question is: How can i show that purple text, that you can see on the image(i have the image from a Youtube Video).

PS: My english is not good... I hope you understand me :o .
« Last Edit: February 08, 2009, 04:29:21 pm by Zack »
I have my own Hamachi server.
I am not allowed to portforward.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: How can i show this?
« Reply #1 on: February 08, 2009, 03:25:09 pm »
The code for it is ~p~ ;)
So it would be:
Code: [Select]
vcmp.announce %id ~p~Force is a heli nub

;D

Offline Zack

  • Street Thug
  • *
  • Posts: 17
  • My english is not good, my main language is Dutch.
    • View Profile
Re: How can i show this?
« Reply #2 on: February 08, 2009, 04:29:02 pm »
And how can i activate that?

I have another question:

I want to make a "Army-Job", you have to type a code like !badplayer and the server choose then a random player.

Can you tell me to where i must add that at the scripts? I am a new scripter.

I have my own Hamachi server.
I am not allowed to portforward.

Offline [NoN]Toiletduck

  • Wiseguy
  • **
  • Posts: 65
    • View Profile
Re: How can i show this? + Random Question
« Reply #3 on: February 08, 2009, 05:20:24 pm »
Well one thing is that the colour of the announcement is determined by this: ~p~ or ~y~.

I do not know what the other colours are.  Does anyone have a list?

Offline Knucis

  • Wiseguy
  • **
  • Posts: 82
  • u wot m9
    • View Profile
Re: How can i show this? + Random Question
« Reply #4 on: February 08, 2009, 05:42:29 pm »
I had one, but I formated my pc, let me see if i remember some:
~h~ --White [I think]
~p~
~~ --- Black [Maybe have some bugs]
~y~
~r~ [I think]
~x~ -- Strange color
~q~

etc...

Offline Mex

  • Wiseguy
  • **
  • Posts: 63
    • View Profile
Re: How can i show this? + Random Question
« Reply #5 on: February 08, 2009, 09:28:17 pm »
i think ~b~ was also one, blue i think

Offline Zack

  • Street Thug
  • *
  • Posts: 17
  • My english is not good, my main language is Dutch.
    • View Profile
Re: How can i show this? + Random Question
« Reply #6 on: February 08, 2009, 10:40:32 pm »
Thanks.
But can you answer too my other question, please?:

I want to make a "Army-Job", you have to type a code like !badplayer and the server choose then a random player.

Can you tell me to where i must add that at the scripts? I am a new scripter.
I have my own Hamachi server.
I am not allowed to portforward.

Offline Mex

  • Wiseguy
  • **
  • Posts: 63
    • View Profile
Re: How can i show this? + Random Question
« Reply #7 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
    }
  }
}

Offline Zack

  • Street Thug
  • *
  • Posts: 17
  • My english is not good, my main language is Dutch.
    • View Profile
Re: How can i show this? + Random Question
« Reply #8 on: February 09, 2009, 07:08:19 pm »
Thank you.
But i was changing a little bit the script (i am learning so i test much) and i have the next script:
Code: [Select]
  elseif (!minigame1* iswm $2) || (!minigame1* iswm $2) {
    if ($vcmp.cmdcheck(!minigame1,%id) == fail) !halt
    else {
      .timer 1 1 vcmp.cmdsay $2 %id Minigame 1 [ARMY-MISSION] is activated by %name . Please wait...
      .timer 1 5 vcmp.cmdsay $2 %id The server will choose soon a random ID.
      .timer 1 8 vcmp.cmdsay $2 %id Your task is to kill that ID and do that so much as possible.
      .timer 1 12 vcmp.cmdsay $2 %id While they are searching for you, you may run away and shoot back too!
      .timer 1 15 vcmp.cmdsay $2 %id You have 120 seconds to kill him so much as you can.
      .timer 1 20 vcmp.cmdsay $2 %id The choosen player is: $vcmp.name($vcmp.randomid)
      .timer 1 21 vcmp.cmdsay $2 %id You have 120 seconds to kill him.
      .timer 1 120 vcmp.cmdsay $2 %id Minigame 1 [ARMY-MISSION] is over. There are no prices in this BETA!
    }
  }

The problem is: The server is choosing always 1 user: "Unknown"  :P .

Thijn was trying to help me, but i didnt work. Can someone tell me what's wrong ??? ?

EDIT2: I have a big problem: I have now a Fix-System, but the scripts are closing himself after 10 seconds. How can i make this?
« Last Edit: February 09, 2009, 07:55:08 pm by Zack »
I have my own Hamachi server.
I am not allowed to portforward.

Offline [NoN]Toiletduck

  • Wiseguy
  • **
  • Posts: 65
    • View Profile
Re: How can i show this? + Random Question
« Reply #9 on: February 09, 2009, 08:14:35 pm »
What error message do you receive?

Offline Zack

  • Street Thug
  • *
  • Posts: 17
  • My english is not good, my main language is Dutch.
    • View Profile
Re: How can i show this? + Random Question
« Reply #10 on: February 09, 2009, 08:20:19 pm »
What error message do you receive?

Its no error, Vista give me the error(i translate it from dutch): MIRC didnt work anymore(or something). The repair-script is done and the MIRC is closing himself(i have this only when i use the repair command).


The Server says: Rcon: Admin [127.0.0.1] has lost connection.
« Last Edit: February 09, 2009, 09:09:51 pm by Zack »
I have my own Hamachi server.
I am not allowed to portforward.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: How can i show this? + Random Question
« Reply #11 on: February 09, 2009, 09:25:35 pm »
Thank you.
But i was changing a little bit the script (i am learning so i test much) and i have the next script:
Code: [Select]
  elseif (!minigame1* iswm $2) || (!minigame1* iswm $2) {
    if ($vcmp.cmdcheck(!minigame1,%id) == fail) !halt
    else {
      .timer 1 1 vcmp.cmdsay $2 %id Minigame 1 [ARMY-MISSION] is activated by %name . Please wait...
      .timer 1 5 vcmp.cmdsay $2 %id The server will choose soon a random ID.
      .timer 1 8 vcmp.cmdsay $2 %id Your task is to kill that ID and do that so much as possible.
      .timer 1 12 vcmp.cmdsay $2 %id While they are searching for you, you may run away and shoot back too!
      .timer 1 15 vcmp.cmdsay $2 %id You have 120 seconds to kill him so much as you can.
      .timer 1 20 vcmp.cmdsay $2 %id The choosen player is: $vcmp.name($vcmp.randomid)
      .timer 1 21 vcmp.cmdsay $2 %id You have 120 seconds to kill him.
      .timer 1 120 vcmp.cmdsay $2 %id Minigame 1 [ARMY-MISSION] is over. There are no prices in this BETA!
    }
  }

The problem is: The server is choosing always 1 user: "Unknown"  :P .

Thijn was trying to help me, but i didnt work. Can someone tell me what's wrong ??? ?

EDIT2: I have a big problem: I have now a Fix-System, but the scripts are closing himself after 10 seconds. How can i make this?
Like I said, You need to add the vcmp.randomid alias wich I made (with base from Mex, Thanks for that)

Code: [Select]
alias vcmp.randomid {
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) {
!return 0
}
else {
%randomid = $gettok(%c, $rand(1, $numtok(%c, 32)), 32)
!return %randomid
}
}
}
Just add that alias to your other Aliases ;) Then it should work

Offline Zack

  • Street Thug
  • *
  • Posts: 17
  • My english is not good, my main language is Dutch.
    • View Profile
Re: How can i show this? + Random Question
« Reply #12 on: February 09, 2009, 09:48:12 pm »
When i add that script to "alias" MIRC says:


Code: [Select]
VCMP General Use Scripts v9.00 - Loaded/Started
VCMP General Use Scripts v9.00 - Attempting to Connect
-
* /vcmp.check.ini: not connected to server (line 33, vcmp.mrc)
-
I have my own Hamachi server.
I am not allowed to portforward.

Offline Mex

  • Wiseguy
  • **
  • Posts: 63
    • View Profile
Re: How can i show this? + Random Question
« Reply #13 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?
« Last Edit: February 09, 2009, 11:24:07 pm by Mex »

Offline Zack

  • Street Thug
  • *
  • Posts: 17
  • My english is not good, my main language is Dutch.
    • View Profile
Re: How can i show this? + Random Question
« Reply #14 on: February 10, 2009, 06:48:47 pm »
The scripts are working again... There's a problem with thijn's Alias.

 ;D . The scripts are fixed, the !fix-problem is fixed... I try soon again the Alias ??? .
« Last Edit: February 10, 2009, 06:56:20 pm by Zack »
I have my own Hamachi server.
I am not allowed to portforward.