RSSy MYGO.pl Opublikowano Wrzesień 8, 2023 o 14:57 RSSy Udostępnij Opublikowano Wrzesień 8, 2023 o 14:57 Hello people ! Can anyone help me add a check to see if I already have a revolver in my hand on respawn because now it gives me two. One falls to the ground and the other remains in my hand. Code: #include <amxmodx> #include <reapi> #include <cromchat> /** ¦¦¦¦ Bitsum validation by Lethality ¦¦¦¦ */ #define is_user_eligible(%0) ( 1 <= %0 <= MaxClients && is_user_vip( %0 ) ) /*¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦*/ #define VIP_FLAG ADMIN_RESERVATION #define PLUGIN "VIP Privileges[ReAPI]" #define VERSION "2.0.3" #define AUTHOR "Lethality" #pragma semicolon 1 /**¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ CUSTOM WEAPONS NATIVES - LETHALITY ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦*/ native IsUserHasMolotov( pPlayer ); native GiveUserMolotov( pPlayer ); native GiveUserRevolver( pPlayer ); /**¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ CUSTOM WEAPONS NATIVES - LETHALITY ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦*/ new bool:g_bInformationMessage[MAX_CLIENTS + 1] = {false, ...}; public plugin_init( ) { register_plugin( PLUGIN, VERSION, AUTHOR ); register_cvar( "VIP Privileges[ReAPI]", VERSION, FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED ); RegisterHookChain( RG_CBasePlayer_Spawn, "@CBasePlayer__Spawn_Post", .post = true ); CC_SetPrefix( "&x01[&x04CS:GO Remake&x01: &x03VIP&x01]" ); } public client_putinserver(id) g_bInformationMessage[id] = false; @CBasePlayer__Spawn_Post(pPlayer) { if (is_user_alive(pPlayer) && is_user_eligible(pPlayer)) { rg_give_item(pPlayer, "item_assaultsuit"); GiveUserRevolver(pPlayer); if (!IsUserHasMolotov(pPlayer)) GiveUserMolotov(pPlayer); if (get_member(pPlayer, m_iTeam) == TEAM_CT) rg_give_defusekit(pPlayer, true); if (!g_bInformationMessage[pPlayer]) { CC_SendMatched(pPlayer, CC_COLOR_TEAM, "&x01Hey &x03%n&x01! &x01You're &x03VIP player &x01and you received &x04FREE items&x01!", pPlayer); g_bInformationMessage[pPlayer] = true; } } } bool:is_user_vip( pPlayer ) return bool:( get_user_flags( pPlayer ) & VIP_FLAG ); /* stock rg_give_item_ex(id, weapon[], GiveType:type = GT_APPEND, ammo = 0, bpammo = 0) { rg_give_item(id, weapon, type); if (ammo) rg_set_user_ammo(id, rg_get_weapon_info(weapon, WI_ID), ammo); if (bpammo) rg_set_user_bpammo(id, rg_get_weapon_info(weapon, WI_ID), bpammo); }*/ Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi