• Welcome to Vice City Multiplayer.
 

Rank/Ladder, Recognizing TeamID, Flying in-game

Started by [AoD]NC, March 12, 2009, 05:14:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[AoD]NC

Hi ;). Im ill, but i need to have information's about something :).

1. Ranks
I want to make something like this, if u type f.e. !top the script will show the 3 best players, that killed the most other players :P.
The numbers of killed players r written in the file vcmp.stats.ini and looks like this:
[KILLS]
QQQQQ=7
EEEEE=5223
WTD=3
SOMEONE=63



2. Recognizing TeamID
Every player is in a team, and every team has a color like red or yellow. But is it possible that the script will recognize the Player's TeamID and do actions?
Like if a players has spawned with Team Color ID f.e. 11, he will be killed, and if someone will spawn as Team Color ID 10, he will be teleported to a location. Would this be possible?

3. Flying in-game
I know, it's a vcmp bug. U are going and then u fly in the air and can't stop. But can scripts do this too? In the last time i saw, that on my test server, where are other players testing the scripts, most of them after some time are flying in the air. Im too, but not so often ;p.

Thxx for any post here  :P

thijn

1) Try this script I wrote for u:

alias vcmp.getrank {
var %1n
var %1k = 0
var %2n
var %2k = 0
var %3n
var %3k = 0
var %max = $ini(vcmp.stats.ini,KILLS,0)
var %a = 1
while (%a <= %max) {
if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %3k) {
if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %2k) {
if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %1k) {
var %1n = $ini(vcmp.stats.ini,KILLS,%a)
var %1k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
}
else {
var %2n = $ini(vcmp.stats.ini,KILLS,%a)
var %2k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
}
}
else {
var %3n = $ini(vcmp.stats.ini,KILLS,%a)
var %3k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
}
}
!inc %a
}
vcmp.say Our 3 Best Players:
vcmp.say 1: %1n - %1k
vcmp.say 2: %2n - %2k
vcmp.say 3: %3n - %3k
}


2) You can't get the team ID, But u can use something like an find skin alias:
alias vcmp.before.findskin {

  ;$1 == ID
  ;$2 == NAME

  timer -m 1 1000 vcmp.findskin $1-
}
alias vcmp.findskin {

  ;$1 == ID
  ;$2 == NAME

  if (Biker1 isin $vcmp.area($1)) {
    !writeini -n vcmp.skin.ini SKINS $1 Biker-Boy
    vcmp.msg $1 You spawned as a Biker-Boy.
  }
  elseif (Biker2 isin $vcmp.area($1)) {
    !writeini -n vcmp.skin.ini SKINS $1 Biker-Buddy
    vcmp.msg $1 You spawned as a Biker-Buddy.
  }
  elseif (Biker isin $vcmp.area($1)) {
    !writeini -n vcmp.skin.ini SKINS $1 Biker
    vcmp.msg $1 You spawned as a Biker.
  }
}

And spawn signal:
on *:SIGNAL:vcmp.spawn:{
  var %name = $1
  var %id = $vcmp.getid($1)

  timer -m 1 500 vcmp.before.findskin %id %name
}


3) I really don't know the answer on this one ???


[AoD]NC

Maaan, thijn u are a pro scripter :D !
The rank system works great :D! I only changed some things:
vcmp.say $1 ** Our 3 Best Players:
vcmp.say $1 ** 1: %1n - %1k
vcmp.say $1 ** 2: %2n - %2k
vcmp.say $1 ** 3: %3n - %3k


And the command:
  elseif ($3 == top) {
    vcmp.getrank $1
  }


And with the skins... I think the commands was made for GUS :P and his old DLL. Well it doesn't work for me, i will try do something but for now i haven't any good idea  :-\

Maybe something like this?
If a player will spawn in a coordination from file spawns.ini -> then send pm You spawned at:

thijn

Quote from: [AoD]NC on March 13, 2009, 10:02:03 AM
Maaan, thijn u are a pro scripter :D !
Thanks ;D

Quote from: [AoD]NC on March 13, 2009, 10:02:03 AM
Maybe something like this?
If a player will spawn in a coordination from file spawns.ini -> then send pm You spawned at:
Maybe you can check the distance between the spawn coords, and the players coords. If you tried but it didnt worked, Please let me know and I will help ya ;)


Skirmant

Quote from: [AoD]NC on March 12, 2009, 05:14:54 PM
3. Flying in-game
I know, it's a vcmp bug. U are going and then u fly in the air and can't stop. But can scripts do this too? In the last time i saw, that on my test server, where are other players testing the scripts, most of them after some time are flying in the air. Im too, but not so often ;p.

Thxx for any post here  :P

Um... I have no idea how to script this, but you can do this very easily by going to any ammu-nation and buying the same weapon at least 10 times in a row. Or... Click "esc" and explore the graphics and sound setting, after that return in game and woah! "I believe I can fly"  ;D
I know advance mIRC, average C++, basic Pawn & Squirrel, very basic Java Script.

Spung

Other Style :D xD but is same :D

Code (Alias) Select
alias vcmp.getrank {
  var %1n
  var %1k = 0
  var %2n
  var %2k = 0
  var %3n
  var %3k = 0
  var %max = $ini(vcmp.stats.ini,KILLS,0)
  var %a = 1
  while (%a <= %max) {
    if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %3k) {
      if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %2k) {
        if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %1k) {
          var %1n = $ini(vcmp.stats.ini,KILLS,%a)
          var %1k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
        }
        else {
          var %2n = $ini(vcmp.stats.ini,KILLS,%a)
          var %2k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
        }
      }
      else {
        var %3n = $ini(vcmp.stats.ini,KILLS,%a)
        var %3k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
      }
    }
    !inc %a
  }
  %how The 3 best players:
  %how 1: %1n - %1k
  %how 2: %2n - %2k
  %how 3: %3n - %3k
}


Code (command) Select
elseif ($3 == rank) {
  $vcmp.getrank(vcmp.say $1)
}

IRC:
elseif ($1 == !rank) {
  $vcmp.getrank(msg $chan 3)
}

thijn

lol that doesn't work since you never made the var %how :P
I guess you mean:

alias vcmp.getrank {
  var %1n
  var %1k = 0
  var %2n
  var %2k = 0
  var %3n
  var %3k = 0
  var %max = $ini(vcmp.stats.ini,KILLS,0)
  var %a = 1
  while (%a <= %max) {
    if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %3k) {
      if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %2k) {
        if ($readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a)) >= %1k) {
          var %1n = $ini(vcmp.stats.ini,KILLS,%a)
          var %1k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
        }
        else {
          var %2n = $ini(vcmp.stats.ini,KILLS,%a)
          var %2k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
        }
      }
      else {
        var %3n = $ini(vcmp.stats.ini,KILLS,%a)
        var %3k = $readini(vcmp.stats.ini,KILLS,$ini(vcmp.stats.ini,KILLS,%a))
      }
    }
    !inc %a
  }
  var %how = $1
  %how The 3 best players:
  %how 1: %1n - %1k
  %how 2: %2n - %2k
  %how 3: %3n - %3k
}


elseif ($3 == rank) {
  $vcmp.getrank(vcmp.say $1)
}

IRC:
elseif ($1 == !rank) {
  $vcmp.getrank(msg $chan 3)
}


[AoD]NC

Wow that was one of my first topics on this forums > : D.

Hmm what I noticed VERY LATE because in this year, is that in fact your first script Thijn works, but it looks like it has a bug, because i found some players with better scores then for example player on place 3rd, but he wasn't in the top 3.

Or maybe I just scripted something bad. Nah I was a nub those times. Sweet times :).