From d66d34cf1759c61ae24e42a10c8a79d87478e138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bergstr=C3=B6m?= Date: Wed, 11 Feb 2004 16:16:37 +0000 Subject: [PATCH] Fun (x) version 0.3 - fixed hud update + flash in set_user_money, removed user_spawn (add as stock later) --- dlls/fun/fun.cpp | 10 ++++++++-- dlls/fun/fun.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/fun/fun.cpp b/dlls/fun/fun.cpp index 552e783d..f5780389 100755 --- a/dlls/fun/fun.cpp +++ b/dlls/fun/fun.cpp @@ -195,7 +195,7 @@ static cell AMX_NATIVE_CALL set_user_money(AMX *amx, cell *params) // set_user_m // Give money to user // params[1] = user // params[2] = money - // params[3] = flash money? (NYI) + // params[3] = flash money? // Check index if (params[1] < 1 || params[1] > gpGlobals->maxClients) @@ -210,6 +210,12 @@ static cell AMX_NATIVE_CALL set_user_money(AMX *amx, cell *params) // set_user_m // Give money (int)*((int *)pPlayer->pvPrivateData + CSMONEYOFFSET) = params[2]; + // Update display + MESSAGE_BEGIN(MSG_ONE, GET_USER_MSG_ID(PLID, "Money", NULL), NULL, pPlayer); + WRITE_LONG(params[2]); + WRITE_BYTE(params[3] ? 1 : 0); // if params[3] is 0, there will be no +/- flash of money in display... + MESSAGE_END(); + return 1; } @@ -531,7 +537,7 @@ AMX_NATIVE_INFO fun_Exports[] = { {"set_user_health", set_user_health}, {"give_item", give_item}, {"spawn", spawn}, - {"user_spawn", spawn}, // No, it's not a typo! Uses the same as "spawn", because they do the same stuff! This is made only to maintain comp. with old plugins! + //{"user_spawn", spawn}, // No, it's not a typo! Uses the same as "spawn", because they do the same stuff! This is made only to maintain comp. with old plugins! {"set_user_money", set_user_money}, {"get_user_money", get_user_money}, {"set_user_deaths_cs", set_user_deaths_cs}, diff --git a/dlls/fun/fun.h b/dlls/fun/fun.h index 3c20b8e1..85e39b11 100755 --- a/dlls/fun/fun.h +++ b/dlls/fun/fun.h @@ -29,7 +29,7 @@ pfnmodule_engine_g* g_engModuleFunc; // These seem to be meta/amxmod related #define NAME "fun" #define AUTHOR "JGHG" -#define VERSION "0.2" +#define VERSION "0.3" #define URL "http://?" #define LOGTAG "fun" #define DATE __DATE__