Results 1 to 5 of 5

Thread: (API?) Scripts

  1. #1
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default (API?) Scripts

    I was thinking just this second about the scripts. I was not happy with the rules getting dragged in to another topic, so I'm putting them here.

    Also I was thinking this could be a discussion on things people use a lot, re script a lot.

    For example:

    a script just named reborn

    I thought of:
    getPlayersWithin
    - gets a list of players within a distance....This could be used for several things.

    isPlayerWithin
    -is a player within this distance

    damagePlayersWithin
    - damages players within a distance by another player

    killPlayersWithin
    - damages players within a distance by another player <- A LOT

    spawnGrenadeExplosion
    - spawns an explosion by a player (so kills work)

    swapWeapon
    - correctly swaps a weapon for another weapon, if they have this weapon

    playersWithWeapon
    -returns a list of all the players with this weapon

    getPlayerPrimarydmweapon
    -gets a players Primarydmweapon

    setPlayerPrimarydmweapon
    -sets a players primary dm weapon



    In admin pro I also had a cvars.scr, did anyone know? :P
    I was thinking actually

    getSplitCvar...which just gets a cvar and splits it up

    Code:
    getSplitCvar local.cvar local.split:
    end waitexec reborn/strings.scr::split (getcvar local.cvar) local.split



    strings.scr
    maths.scr
    files.scr
    hud.scr

  2. #2
    Developer
    Join Date
    Jun 2010
    Location
    Hungary
    Posts
    291

    Default

    I posted in other thread that it would be great this kind of scripts you writed here (getPlayerPrimarydmweapon) to define the weapons and define the ammo. Getweaponamostock, Getweaponammoclip etc.

    There is a script command "$player listinventory" but it prints only in the console and that's all.

  3. #3
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    player listinventory would be very helpful for a lot of people I think, RR?

    ammo is v.difficult as it resets all the time, maybe it would require a handler to keep track of requested ammo's and settings...could be done..worth it?

  4. #4
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    I'll take a look at the inventory list.

  5. #5

    Default

    Quote Originally Posted by Elgan View Post
    I was not happy with the rules getting dragged in to another topic, so I'm putting them here.
    Sorry, I thought it was related. WON'T happen again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •