Fun (x) version 0.3 - fixed hud update + flash in set_user_money, removed user_spawn (add as stock later)

This commit is contained in:
Johnny Bergström 2004-02-11 16:16:37 +00:00
parent c43d336bdb
commit d66d34cf17
2 changed files with 9 additions and 3 deletions

View File

@ -195,7 +195,7 @@ static cell AMX_NATIVE_CALL set_user_money(AMX *amx, cell *params) // set_user_m
// Give money to user // Give money to user
// params[1] = user // params[1] = user
// params[2] = money // params[2] = money
// params[3] = flash money? (NYI) // params[3] = flash money?
// Check index // Check index
if (params[1] < 1 || params[1] > gpGlobals->maxClients) 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 // Give money
(int)*((int *)pPlayer->pvPrivateData + CSMONEYOFFSET) = params[2]; (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; return 1;
} }
@ -531,7 +537,7 @@ AMX_NATIVE_INFO fun_Exports[] = {
{"set_user_health", set_user_health}, {"set_user_health", set_user_health},
{"give_item", give_item}, {"give_item", give_item},
{"spawn", spawn}, {"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}, {"set_user_money", set_user_money},
{"get_user_money", get_user_money}, {"get_user_money", get_user_money},
{"set_user_deaths_cs", set_user_deaths_cs}, {"set_user_deaths_cs", set_user_deaths_cs},

View File

@ -29,7 +29,7 @@ pfnmodule_engine_g* g_engModuleFunc; // These seem to be meta/amxmod related
#define NAME "fun" #define NAME "fun"
#define AUTHOR "JGHG" #define AUTHOR "JGHG"
#define VERSION "0.2" #define VERSION "0.3"
#define URL "http://?" #define URL "http://?"
#define LOGTAG "fun" #define LOGTAG "fun"
#define DATE __DATE__ #define DATE __DATE__