Author Topic: Rank/Ladder, Recognizing TeamID, Flying in-game  (Read 5148 times)

0 Members and 1 Guest are viewing this topic.

Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Rank/Ladder, Recognizing TeamID, Flying in-game
« on: March 12, 2009, 08:14:54 pm »
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:
Code: [Select]
[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

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Rank/Ladder, Recognizing TeamID, Flying in-game
« Reply #1 on: March 12, 2009, 08:58:30 pm »
1) Try this script I wrote for u:
Code: [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
}
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:
Code: [Select]
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:
Code: [Select]
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 ???

Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: Rank/Ladder, Recognizing TeamID, Flying in-game
« Reply #2 on: March 13, 2009, 01:02:03 pm »
Maaan, thijn u are a pro scripter :D !
The rank system works great :D! I only changed some things:
Code: [Select]
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:
Code: [Select]
  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?
Code: [Select]
If a player will spawn in a coordination from file spawns.ini -> then send pm You spawned at:

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Rank/Ladder, Recognizing TeamID, Flying in-game
« Reply #3 on: March 13, 2009, 06:49:52 pm »
Maaan, thijn u are a pro scripter :D !
Thanks ;D

Maybe something like this?
Code: [Select]
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 ;)

Offline Skirmant

  • Made Man
  • ***
  • Posts: 134
    • View Profile
Re: Rank/Ladder, Recognizing TeamID, Flying in-game
« Reply #4 on: August 09, 2009, 06:19:16 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

Offline Spung

  • Street Thug
  • *
  • Posts: 6
  • eLITENetwork's® Chile!
    • View Profile
    • eLITENetwork's® Chile!
Re: Rank/Ladder, Recognizing TeamID, Flying in-game
« Reply #5 on: August 29, 2010, 02:28:24 am »
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)
}

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Rank/Ladder, Recognizing TeamID, Flying in-game
« Reply #6 on: September 01, 2010, 06:04:42 pm »
lol that doesn't work since you never made the var %how :P
I guess you mean:

Code: [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
  }
  var %how = $1
  %how The 3 best players:
  %how 1: %1n - %1k
  %how 2: %2n - %2k
  %how 3: %3n - %3k
}

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

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

Offline [AoD]NC

  • VC:MP Beta Tester
  • VC:MP Veteran
  • *
  • Posts: 616
  • AoD forever!
    • View Profile
    • KURWA MAĆ
Re: Rank/Ladder, Recognizing TeamID, Flying in-game
« Reply #7 on: September 01, 2010, 11:24:07 pm »
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 :).