Raised This Month: $32 Target: $400
 8% 

[CS:S] MVP Hax


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dr!fter
The Salt Boss
Join Date: Mar 2007
Plugin ID:
2944
Plugin Version:
1.0.0
Plugin Category:
Technical/Development
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Adds natives to set/get MVP star count.
    Unapprover:
    Reason for Unapproving:
    Implemented into SourceMod
    Old 05-10-2012 , 16:13   [CS:S] MVP Hax
    Reply With Quote #1

    Oh hi.

    Someone wanted a way to set MVP count without using SDKHooks. So this method is here. It sets/reads the actual value on the player class. So simple as set it and forget it.

    Note: I only tested windows but gamedata has windows,linux, and even mac offsets

    Natives:
    PHP Code:
    /* Get the amount of MVP's a client has
     *
     * @param client        Client index to get MVP count for.
     *
     * @return Returns number of MVP's the client has.
     * @error Invalid client index
    */
    native GetMVPCount(client);

    /* Set the amount of MVP's a client has
     *
     * @param client        Client index to set MVP count for.
     * @param count            Value to set clients MVP count to.
     *
     * @noreturn
     * @error Invalid client index
    */
    native SetMVPCount(clientcount); 
    Example plugin:
    PHP Code:
    #include <sourcemod>
    #include <mvphax>

    public OnPluginStart()
    {
        
    RegConsoleCmd("sm_getmvp"GetMvp);
        
    RegConsoleCmd("sm_setmvp"SetMvp);
    }
    public 
    Action:SetMvp(clientargs)
    {
        new 
    String:buffer[12];
        
    GetCmdArgString(buffersizeof(buffer));
        new 
    value StringToInt(buffer);
        
    SetMVPCount(clientvalue);
    }
    public 
    Action:GetMvp(clientargs)
    {
        
    PrintToChat(client"Your mvp count is %i"GetMVPCount(client));

    Install:
    mvphax.smx -> addons/sourcemod/plugins
    mvphax.games.txt -> addons/sourcemod/gamedata
    mvphax.inc -> addons/sourcemod/scripting/include (only needed for developing other plugins)

    Thats all folks.
    Attached Files
    File Type: sp Get Plugin or Get Source (mvphax.sp - 895 views - 1.6 KB)
    File Type: txt mvphax.games.txt (136 Bytes, 325 views)
    File Type: inc mvphax.inc (536 Bytes, 432 views)
    Dr!fter is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 05-10-2012 , 21:55   Re: [CS:S] MVP Hax
    Reply With Quote #2

    Thanks =) !

    I'll probably implement it in Kill Assist as an alternative way to get MVP stars.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 05-10-2012 , 23:40   Re: [CS:S] MVP Hax
    Reply With Quote #3

    Few info when player MVP stars reset...

    - reconnect
    - mp_restartgame <seconds>
    - and new round after this event (in both team, one player spawn)
    Code:
    Game event "round_end", Tick 15105:
    - "winner" = "1"
    - "reason" = "15"
    - "message" = "#Game_Commencing"

    @thanx drifter for "hax"
    Bacardi is offline
    Dr!fter
    The Salt Boss
    Join Date: Mar 2007
    Old 05-27-2012 , 19:51   Re: [CS:S] MVP Hax
    Reply With Quote #4

    This method has been added to the cstrike extension in the newest 1.5 snapshots.
    http://hg.alliedmods.net/sourcemod-c...v/c7421e302b11
    Dr!fter is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 05-28-2012 , 15:51   Re: [CS:S] MVP Hax
    Reply With Quote #5

    Darn, i didn't even know about that one before :/
    __________________
    Peace-Maker is offline
    WireleZz
    Senior Member
    Join Date: Jan 2010
    Old 06-25-2012 , 06:30   Re: [CS:S] MVP Hax
    Reply With Quote #6

    Hello Dr!fter,

    I was wondering if you could edit this plugin a little bit for me?

    I would like to have it like this:

    Anyone in my server is allowed to type "!1337" and when they type this they will get stars in their name once they type it again it will turn off again

    however they will not be able to spam this message in chat it shoud say "Stop Spamming The 1337" Or somthing.

    Are you able to do this? With or with no sdkhooks i dont mind :-)

    Thanks
    WireleZz 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 08:22.


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