Author Topic: Ideas  (Read 777 times)

0 Members and 1 Guest are viewing this topic.

Offline Ahmed Muhammad

  • Major(1)
  • Posts: 6
Ideas
« on: June 16, 2007, 02:35:20 am »
Hey im writing a script which makes it so when a player is killed by a certain player they are given a status, when they then kill a player this player is given a status. And then when all players have that status it is reset and none of the player have that status any more (exept 1 bot which will give them the status).

I was thinking since I dont think I can anyhow tag the status onto an ID, to use arrays and names. So I thought setup an array and when a player is killed check the array if the killer has the status, (eg the killers name is in the array) if so add the victims name to the array. And then when everyones name is in the array to somehow wipe the array (exept for the bot).

Hope this makes sence. As i have extremly limited experience with arrays I was hoping someone could show me an example script of how I may do this. How to write name into arrays without overwriting others and then how to clear it with another toggle.

Cheers

Date Posted: June 16, 2007, 03:32:30 AM
For it to make more sence you could think of it as a Zombie scipt or Flame Running (im making a similar themed game style). When a Zombie kills a player they become a Zombie. When the whole server are Zombies (eg no players left) round restarts and only the bot is left as a Zombie.

Offline spkka

  • Camper
  • ***
  • Posts: 469
Re: Ideas
« Reply #1 on: June 16, 2007, 04:03:07 am »
Quote
For it to make more sence you could think of it as a Zombie scipt or Flame Running (im making a similar themed game style). When a Zombie kills a player they become a Zombie. When the whole server are Zombies (eg no players left) round restarts and only the bot is left as a Zombie.

well make the server in survival mode...  check if the player was killed by a zombie then add another zombie?
Then kick the bots when the round restarts




Offline kornsick

  • Major(1)
  • Posts: 42
  • Fhtagn!
    • Soldat Server @ StarNet
Re: Ideas
« Reply #2 on: June 16, 2007, 12:54:47 pm »
if i could script something, i would try to script this:
If you kill someone, your weapon changes to a random one. Or you explode. >_<
*exploded*

Offline Ahmed Muhammad

  • Major(1)
  • Posts: 6
Re: Ideas
« Reply #3 on: June 16, 2007, 11:02:31 pm »
ummmm ok....

Nah I want the players to become zombies... Not bots.

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: Ideas
« Reply #4 on: June 16, 2007, 11:26:26 pm »
You just have to have a global array of bytes that goes from 1 to 32.
And when a player is killed that ID in the array is set to 1 and you respawn the player.

Then you have a procedure that loops through the array and if that player ID is active and that entry in the array is equal to 0 then add one.
So basically that procedure will return the number of non-zombies left. And you just call that onPlayerKill and if it's 0 then start a new round.