Raised This Month: $51 Target: $400
 12% 

Empires Mod Tools And API


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Theowningone
SourceMod Donor
Join Date: Aug 2008
Plugin ID:
553
Plugin Version:
1.1
Plugin Category:
Admin Commands
Plugin Game:
Empires
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Useful Tools For Empires Mod
    Unapprover:
    Reason for Unapproving:
    Many functions no longer working for past year(s)
    Old 09-25-2008 , 22:30   Empires Mod Tools And API
    Reply With Quote #1

    A plugin I made just kinda screwing around. Some of the stuff is a bit hard to find so i figured it could be rather useful.

    More than anything this is to show off the include i made.

    Commands:
    • sm_setbreinf <amount> - Set BE Reinforcements/Tickets.
    • sm_setnreinf <amount> - Set NF Reinforcements/Tickets.
    • sm_givebreinf <amount> - Adds BE Reinforcements/Tickets.
    • sm_givenreinf <amount> - Adds NF Reinforcements/Tickets.
    • sm_setbres <amount> - Set BE Resources.
    • sm_setnres <amount> - Set NF Resources.
    • sm_givebres <amount> - Adds BE Resources.
    • sm_givenres <amount> -Adds NF Resources.
    • sm_getbres - Print BE Resources to Admin In Chat.
    • sm_getnres - Print NF Resources to Admin In Chat.
    • sm_uticks <0|1> - Give Unlimited tickets to both sides.
    • sm_ubticks <0|1> - Give Unlimited tickets to BE.
    • sm_unticks <0|1> - Give Unlimited tickets to NF.
    • sm_ures <0|1> - Give Unlimited resources to both sides.
    • sm_ubres <0|1> - Give Unlimited resources to BE.
    • sm_unres <0|1> - Give Unlimited resources to NF.
    Seeing how these commands have a massive effect on the game the commands are defaulted to root access only.





    For those coders out there i made an include with a bunch of stocks....

    just at the top of you plugin put...
    Code:
    #include "empires"
    and make sure the empires.inc file is in the includes directory in the compiler folder.

    API 1.2 RELEASED!

    Code:
    /*
    * Empires API
    * 
    * Created By Theowningone
    * Version: 1.2
    * http://www.theowningone.info/
    * http://www.borgamers.com/
    */
    
    /********************
    * --> Is Stocks <-- *
    ********************/
    
    /**
    * Is Player Squad Leader
    *
    * @param client            Client Index
    * @return                1 if leader, 0 if other
    */
    stock IsSquadLeader(client)
    
    /**
    * Is Player Commander
    *
    * @param client            Client Index
    * @return                1 if comm, 0 if other
    */
    stock IsComm(client)
    
    /**
    * Is Player In Vehicle
    *
    * @param client            Client Index
    * @return                1 if in vehicle, 0 if not
    */
    stock IsInVehicle(client)
    
    
    
    
    
    /**********************
    * --> Team Stocks <-- *
    **********************/
    
    /**
    * Retrieves NF Resources.
    *
    * @return                NF Resources
    */
    stock GetNFResources()
    
    /**
    * Sets NF Resources.
    *
    * @noreturn
    */
    stock SetNFResources(amount)
    
    /**
    * Retrieves BE Resources.
    *
    * @return                BE Resources
    */
    stock GetBEResources()
    
    /**
    * Sets BE Resources.
    *
    * @noreturn
    */
    stock SetBEResources(amount)
    
    /**
    * Retrieves NF Reinforcements
    *
    * @return                NF Reinforcements
    */
    stock GetNFReinforcements()
    
    /**
    * Sets NF Reinforcements
    *
    * @noreturn
    */
    stock SetNFReinforcements(amount)
    
    /**
    * Retrieves BE Reinforcements
    *
    * @return                BE Reinforcements
    */
    stock GetBEReinforcements()
    
    /**
    * Sets BE Reinforcements
    *
    * @noreturn
    */
    stock SetBEReinforcements(amount)
    
    /**
    * Is Researched
    *
    * @param team            Team Index
    * @param index            Research Index
    * @return                1 if researched, 0 if not
    */
    stock IsResearched(team, index)
    
    /**
    * Current Research
    *
    * @param team            Team Index
    * @return                Research Index
    */
    stock CurrentResearch(team)
    
    /**
    * Current Research Name
    *
    * @param team            Team Index
    * @param buffer            Buffer to hold the research name
    * @param size            Len of the buffer
    * @return                Research Index
    */
    stock CurrentResearchName(team, String:buffer[], size)
    
    /**
    * Set Research
    *
    * @param team            Team Index
    * @param index            Research Index
    * @param status            weather to research or not
    * @noreturn
    */
    stock SetResearch(team, index, bool:status)
    
    
    
    
    /*************************
    * --> Vehicle Stocks <-- *
    *************************/
    
    /**
    * Get Vehicle Occupants
    *
    * @param ent            Vehicle Entity Index
    * @return               Amount of clients in vehicle
    */
    stock GetVehicleOccupants(ent)
    
    /**
    * Get Vehicle Driver
    *
    * @param ent            Vehicle Entity Index
    * @return                 Client Index of Driver (0 if none, -1 if invalid entity)
    */
    stock GetVehicleDriver(ent)
    
    /**
    * Set Vehicle Armor
    *
    * @param ent            Vehicle Entity Index
    * @param side            side of armor (1 is front, 2 is back, 3 is left, 4 is right)
    * @param front            Health to set armor to
    * @return                -1 on error, 0 on success
    */
    stock SetVehicleArmor(ent, side, Float:health)
    
    /**
    * Get Vehicle Armor
    *
    * @param ent            Vehicle Entity Index
    * @param side            side of armor (1 is front, 2 is back, 3 is left, 4 is right)
    * @return                Armor Health (-1.0 on error)
    */
    stock Float:GetVehicleArmor(ent, side)
    
    /**
    * Set Vehicle Hull
    *
    * @param ent            Vehicle Entity Index
    * @param health            Health to set hull to
    * @return                -1 on error, 0 on success
    */
    stock SetVehicleHull(ent, Float:health)
    
    /**
    * Get Vehicle Hull
    *
    * @param ent            Vehicle Entity Index
    * @return                Hull Health (-1.0 on error)
    */
    stock Float:GetVehicleHull(ent)
    
    /**
    * Set Vehicle Heat
    *
    * @param ent            Vehicle Entity Index
    * @param heat            Heat to set for vehicle
    * @return                -1 on error, 0 on success
    */
    stock SetVehicleHeat(ent, Float:heat)
    
    /**
    * Get Vehicle Heat
    *
    * @param ent            Vehicle Entity Index
    * @return                Vehicle Heat (-1.0 on error)
    */
    stock Float:GetVehicleHeat(ent)
    
    /**
    * Get Vehicle Class
    *
    * @param ent            Vehicle Entity Index
    * @return                Vehicle Class (-1 on error)
    */
    stock GetVehicleClass(ent)
    
    /**
    * Get Vehicle Class Name
    *
    * @param ent            Vehicle Entity Index
    * @param buffer            Buffer to hold the vehicle class name
    * @param size            Len of the buffer
    * @return                Vehicle Class (-1 on error)
    */
    stock GetVehicleClassName(ent, String:buffer[], size)
    
    /**
    * Get Client Vehicle
    *
    * @param client            Client Index
    * @return                Client Vehicle Entity Index (-1 is error, 0 is none)
    */
    stock GetPlayerVehicle(client)
    
    /**
    * Get Cannon Entity
    *
    * @param ent            Vehicle Entity Index
    * @return                Cannon Entity Index
    */
    stock GetCannonEnt(ent)
    
    /**
    * Get Turret Entity
    *
    * @param ent            Vehicle Entity Index
    * @return                Turret Entity Index
    */
    stock GetTurretEnt(ent)
    
    
    
    
    
    
    
    /**********************
    * --> Misc Stocks <-- *
    **********************/
    
    /**
    * Retrieves a player's squad number
    *
    * @param client            Client Index
    * @return                Player squad index (0 is none)
    */
    stock GetPlayerSquadNum(client)
    
    /**
    * Retrieves a player's squad name
    *
    * @param client            Client Index
    * @param buffer            Buffer to hold the squad name
    * @param size            Len of the buffer
    * @return                Player squad index
    */
    stock GetPlayerSquadName(client, String:buffer[], size)
    
    /**
    * Retrieves a player's score
    *
    * @param client            Client Index
    * @return                Player score
    */
    stock GetPlayerScore(client)
    
    /**
    * Retrieves a player's class
    *
    * @param client            Client Index
    * @return                Player class (0 is scout, 1 is rifleman, 2 is gren, 3 is engy, 5 is spec)
    */
    stock GetPlayerClassNum(client)
    
    /**
    * Retrieves a player's class
    *
    * @param client            Client Index
    * @param buffer            Buffer to hold the class name
    * @param size            Len of the buffer
    * @return                Player class index
    */
    stock GetPlayerClassName(client, String:buffer[], size)
    Attached Files
    File Type: smx rg_emp_tools.smx (5.0 KB, 552 views)
    File Type: sp Get Plugin or Get Source (rg_emp_tools.sp - 516 views - 8.2 KB)
    File Type: inc empires.inc (26.7 KB, 550 views)

    Last edited by psychonic; 03-23-2010 at 12:32. Reason: Reason: changed "game" field to newly created Empires category
    Theowningone is offline
    recon0
    Veteran Member
    Join Date: Sep 2007
    Location: US
    Old 09-25-2008 , 23:11   Re: Empires Mod Tools
    Reply With Quote #2

    Awesome.
    __________________
    recon0 is offline
    napalm burn baby
    New Member
    Join Date: Oct 2008
    Old 10-26-2008 , 05:46   Re: Empires Mod Tools And API
    Reply With Quote #3

    owning i love it it works well

    pity as soon as you run any of em everyone goes "ABUSE" LOL
    napalm burn baby is offline
    Theowningone
    SourceMod Donor
    Join Date: Aug 2008
    Old 11-07-2008 , 23:36   Re: Empires Mod Tools And API
    Reply With Quote #4

    API version 1.2 released. Includes new vehicle stocks.
    Theowningone is offline
    Marek
    New Member
    Join Date: Aug 2010
    Old 11-16-2010 , 18:06   Re: Empires Mod Tools And API
    Reply With Quote #5

    Outdated, server tables changed.
    Marek is offline
    Bort
    Member
    Join Date: Aug 2008
    Old 05-20-2011 , 22:07   Re: Empires Mod Tools And API
    Reply With Quote #6

    We would love to use this plugin on a private server to do our own balance testing with the game in route to modifications to Empires we're considering.

    Is it true that it's out-dated and doesn't work? It returns stack errors on our live server.

    Code:
    22:02:36 L 05/20/2011 - 22:02:43: rcon from "<IP:PORT ADDRESS>": command "sm_setbres 1500"
    22:02:36 L 05/20/2011 - 22:02:43: [SM] Native "SetEntData" reported: Offset -1 is invalid
    22:02:36 L 05/20/2011 - 22:02:43: [SM] Displaying call stack trace for plugin "rg_emp_tools.smx":
    22:02:36 L 05/20/2011 - 22:02:43: [SM]   [0]  Line 65, D:\sourcemod\empires.inc::SetBEResources()
    22:02:36 L 05/20/2011 - 22:02:43: [SM]   [1]  Line 118, D:\sourcemod\rg_emp_tools.sp::Command_setbres()
    It seems it's trying to call a local drive (D:\sourcemod\) that doesn't exist.
    Bort is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 12:52.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode