Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[forums.alliedmods.net] [CS:S] MVP Hax


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 488
  • Lokalizacja:AMXX.PL
Offline

Napisano 10.05.2012 21:13

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(client, count);

Example plugin:


PHP Code:

#include <sourcemod>
#include <mvphax>

public OnPluginStart()
{
RegConsoleCmd("sm_getmvp", GetMvp);
RegConsoleCmd("sm_setmvp", SetMvp);
}
public
Action:SetMvp(client, args)
{
new
String:buffer[12];
GetCmdArgString(buffer, sizeof(buffer));
new
value = StringToInt(buffer);
SetMVPCount(client, value);
}
public
Action:GetMvp(client, args)
{
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 Dołączona grafika Get Plugin or Get Source (mvphax.sp - 1.6 KB) Dołączona grafika mvphax.games.txt (136 Bytes) Dołączona grafika mvphax.inc (536 Bytes)

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych