AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [CS:S] MVP Hax (https://forums.alliedmods.net/showthread.php?t=184932)

Dr!fter 05-10-2012 16:13

[CS:S] MVP Hax
 
3 Attachment(s)
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 :3

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.

RedSword 05-10-2012 21:55

Re: [CS:S] MVP Hax
 
Thanks =) !

I'll probably implement it in Kill Assist as an alternative way to get MVP stars.

Bacardi 05-10-2012 23:40

Re: [CS:S] MVP Hax
 
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"

Dr!fter 05-27-2012 19:51

Re: [CS:S] MVP Hax
 
This method has been added to the cstrike extension in the newest 1.5 snapshots.
http://hg.alliedmods.net/sourcemod-c...v/c7421e302b11

Peace-Maker 05-28-2012 15:51

Re: [CS:S] MVP Hax
 
Darn, i didn't even know about that one before :/

WireleZz 06-25-2012 06:30

Re: [CS:S] MVP Hax
 
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


All times are GMT -4. The time now is 14:46.

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