From 0e3727573ef272c59fafb84ed934358c4223ef53 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Wed, 1 Feb 2006 13:04:24 +0000 Subject: [PATCH] added get_user_footsteps --- dlls/fun/fun.cpp | 8 ++++++++ plugins/include/fun.inc | 3 +++ 2 files changed, 11 insertions(+) diff --git a/dlls/fun/fun.cpp b/dlls/fun/fun.cpp index 1cbf1cbd..188d16ed 100755 --- a/dlls/fun/fun.cpp +++ b/dlls/fun/fun.cpp @@ -519,6 +519,13 @@ static cell AMX_NATIVE_CALL set_user_footsteps(AMX *amx, cell *params) // set_us return 1; } +static cell AMX_NATIVE_CALL get_user_footsteps(AMX *amx, cell *params) +{ + CHECK_PLAYER(params[1]); + + return g_silent[params[1]]; +} + // SidLuke static cell AMX_NATIVE_CALL strip_user_weapons(AMX *amx, cell *params) { // index CHECK_PLAYER(params[1]); @@ -570,6 +577,7 @@ AMX_NATIVE_INFO fun_Exports[] = { {"get_user_maxspeed", get_user_maxspeed}, {"set_user_gravity", set_user_gravity}, {"get_user_gravity", get_user_gravity}, + {"get_user_footsteps", get_user_footsteps}, {"set_user_hitzones", set_user_hitzones}, {"get_user_hitzones", get_user_hitzones}, {"set_user_noclip", set_user_noclip}, diff --git a/plugins/include/fun.inc b/plugins/include/fun.inc index 54ebcc11..11d07482 100755 --- a/plugins/include/fun.inc +++ b/plugins/include/fun.inc @@ -78,6 +78,9 @@ native set_user_noclip(index, noclip = 0); /* Returns 1 if noclip is set. */ native get_user_noclip(index); +/* Returns 1 if player has silent footsteps, 0 if footsteps are set to normal */ +native get_user_footsteps(index); + /* Gives player silent footsteps. * if set = 0 it will return footsteps to normal */ native set_user_footsteps(id, set = 1);