Witam, posiadam na serwerze RPG MODa, dokładnie tego: https://forums.allie...ad.php?p=854448.
Chciałem przerobić dwie umiejętności pod vipa, a dokładnie:
- Recoil-
- SpeedShoot+
Ale coś mi nie wychodzi.
Oto kod Recoil- oryginalny:
#pragma semicolon 1 #include <amxmodx> #include <engine> #include <rpgx> new upgrade_id; new level, Float:punchangle[3]; public plugin_init() register_plugin("Recoil- RPGx Upgrade", "2.0", "roflmao456"); public RPGx_OnPluginReady() upgrade_id = RPGx_MakeUpgrade("Recoil-", 5, 15, 20); public client_PreThink(id){ level = RPGx_GetUpgradeLevel(id, upgrade_id); if(level){ entity_get_vector(id, EV_VEC_punchangle, punchangle); new Float:lowre = float(level) * 0.05; punchangle[0] -= punchangle[0] * lowre; punchangle[1] -= punchangle[1] * lowre; punchangle[2] -= punchangle[2] * lowre; entity_set_vector(id, EV_VEC_punchangle, punchangle); } }
A to który sam próbowałem zrobić:
#pragma semicolon 1 #include <amxmodx> #include <engine> #include <rpgx> new upgrade_id; new level, Float:punchangle[3]; public plugin_init() register_plugin("Recoil- RPGx Upgrade", "2.0", "roflmao456"); public RPGx_OnPluginReady() upgrade_id = RPGx_MakeUpgrade("Recoil-", 5, 15, 20); public client_PreThink(id){ if (!(get_user_flags(id) & ADMIN_LEVEL_H)) return; //nwm czy to dobrze level = RPGx_GetUpgradeLevel(id, upgrade_id); if(level){ entity_get_vector(id, EV_VEC_punchangle, punchangle); new Float:lowre = float(level) * 0.05; punchangle[0] -= punchangle[0] * lowre; punchangle[1] -= punchangle[1] * lowre; punchangle[2] -= punchangle[2] * lowre; entity_set_vector(id, EV_VEC_punchangle, punchangle); } }
Chciałbym żeby była wyświetlana informacja w print_chat, jak gracz nie ma vipa: "Nie masz dostępu do tej umiejętności"
Załączam owe pluginy oraz plik include do kompilacji.
Proszę o szybką pomoc. Nagradzam + oczywiści.
Załączone pliki
Użytkownik protypek edytował ten post 26.05.2015 16:31