[ReQ] Instead of VIP Features.

Unpaid Requests, Public Plugins
User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#21

Post by Raheem » 6 years ago

The weapons menu source i use is same as posted in GamePlay section. Just find this line: rg_give_item(id, szWeaponName, GT_REPLACE) replace it with rg_give_item(id, szWeaponName, GT_APPEND)

I'll post the better solution using native later.
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#22

Post by Spir0x » 6 years ago

Thnaks :)

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#23

Post by Spir0x » 6 years ago

with this code i got 3 freez nades and 2 fire nades and i already replaced GT_APPEND and the m249 still appear when i choose another one.
now no need to add the models becuz i'm using new_weapons.ini :D

Code:

Code: Select all

#include <ze_vip>
 
public plugin_init()
{
    register_plugin("VIP Features", "1.0", "Raheem")
}
 
public ze_user_humanized(id)
{
    // Not Admin? Exit the function...
    if (!is_user_alive(id) || !(ze_get_vip_flags(id) & VIP_A) || ze_is_user_zombie(id))
        return
   
    // Give M249
    rg_give_item(id, "weapon_m249", GT_APPEND)
    rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200)
   
    // Give x2 Fire Nades
    rg_give_item(id, "weapon_hegrenade", GT_APPEND)
    rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade")) + 1)
   
    // Give x2 Frost Nades
    rg_give_item(id, "weapon_flashbang", GT_APPEND)
    rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang")) + 1)
}

User avatar
TheWhitesmith
Member
Member
Morocco
Posts: 33
Joined: 6 years ago
Location: Temara/Rabat
Contact:

#24

Post by TheWhitesmith » 6 years ago

I believe the weapons plugin has an option that strips the weapon from the player. If you don't have the source to remove it you may want to create a menu option inside VIP Menu where he can get M249 if he doesnt have it without stripping user weapons, so he will have the weapon he choose + M249.
[SYA] CSGO-Mod for CS 1.6 [ Cases/Keys/Rank ][/size]
IP: 149.202.251.74:27016

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#25

Post by Spir0x » 6 years ago

in another servers he take this minigun with out any menu.
and i dont know how to make VIP menu inside main menu.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#26

Post by Spir0x » 6 years ago

I'm still want this useful plugin.
Minigun VIP
Best Solution Raheem is make it on Extra-Items like you said.
3. Minigun \w[\rVIP\w]

or add natives into ze_weapon_menu to make this minigun fixed for vips.

also normal players will never use m249.
if weapon be restricted or something.

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#27

Post by Raheem » 6 years ago

Open ze_weapons_menu.sma and find this:
    1. public Buy_Primary_Weapon(id, selection)
    2. {
    3.     static szWeaponName[32]
    4.     ArrayGetString(g_szPrimaryWeapons, selection, szWeaponName, charsmax(szWeaponName))
    5.     new iWeaponId = get_weaponid(szWeaponName)
    6.    
    7.     // Strip and Give Full Weapon
    8.     rg_give_item(id, szWeaponName, GT_REPLACE)
    9.     rg_set_user_bpammo(id, WeaponIdType:iWeaponId, szMaxBPAmmo[iWeaponId])
    10.    
    11.     // Primary bought
    12.     g_bBoughtPrimary[id] = true
    13. }
Change to:
    1. public Buy_Primary_Weapon(id, selection)
    2. {
    3.     static szWeaponName[32]
    4.     ArrayGetString(g_szPrimaryWeapons, selection, szWeaponName, charsmax(szWeaponName))
    5.     new iWeaponId = get_weaponid(szWeaponName)
    6.    
    7.     // Strip and Give Full Weapon
    8.     rg_give_item(id, szWeaponName, GT_APPEND)
    9.     rg_set_user_bpammo(id, WeaponIdType:iWeaponId, szMaxBPAmmo[iWeaponId])
    10.    
    11.     // Primary bought
    12.     g_bBoughtPrimary[id] = true
    13. }
Clearly i only replaced GT_REPLACE with GT_APPEND. So it does not strip players weapon. This is what you need.
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#28

Post by Spir0x » 6 years ago

what about
native ze_giveminigun(id)
on ze_weapon_menu ?

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#29

Post by Raheem » 6 years ago

I don't remember. Tell me now what the problem and post final code you have.
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#30

Post by Spir0x » 6 years ago

i dont have a game server.

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#31

Post by Night Fury » 6 years ago

Look. If you're VIP, you'll get 1 more addition on the amount you already have. If you're not VIP, you'll just get amount of nades as same as you set in your configuration file.
If you want M249 to be given after the player chooses gun & pistol, you can set a task or:
Open ze_weapons, make simply 3 variables & each variable should handle something (gun, pistol or nade). Set all of them to false. Once the player chooses anything (depends on what the choice was) set its variable to true. After that make 3 natives which you could use to retive the value lf those variables. At the end, use them in your VIP minigun as you want.
I prefer 2nd solution of course. Good luck.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#32

Post by Spir0x » 6 years ago

Solved this plugins looks good but missing something i think is when i drop the minigun normal players can pick it up or in maps too, already with Restrict weapon.

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#33

Post by Raheem » 6 years ago

Post latest code you have so i add check if player not VIP so make it normal weapon.
He who fails to plan is planning to fail

User avatar
SexY DeviL CJ
Mod Tester
Mod Tester
Posts: 73
Joined: 6 years ago
Contact:

#34

Post by SexY DeviL CJ » 5 years ago

Spir0x wrote: 6 years ago Solved this plugins looks good but missing something i think is when i drop the minigun normal players can pick it up or in maps too, already with Restrict weapon.
Hello Spirox Can You Provide me the solved sma ? Both ZE_Weapons.sma & Ze_minigun Cause I Need It To :D Thankyou! Or @Raheem?
......Devil Was Here......

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#35

Post by sPe3doN » 5 years ago

SexY DeviL CJ wrote: 5 years ago
Spir0x wrote: 6 years ago Solved this plugins looks good but missing something i think is when i drop the minigun normal players can pick it up or in maps too, already with Restrict weapon.
Hello Spirox Can You Provide me the solved sma ? Both ZE_Weapons.sma & Ze_minigun Cause I Need It To :D Thankyou! Or @Raheem?
here: viewtopic.php?f=15&t=2750
Image

User avatar
SexY DeviL CJ
Mod Tester
Mod Tester
Posts: 73
Joined: 6 years ago
Contact:

#36

Post by SexY DeviL CJ » 5 years ago

Not working lol
......Devil Was Here......

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#37

Post by sPe3doN » 5 years ago

SexY DeviL CJ wrote: 5 years ago Not working lol
mybe you did'nt change weapon menu
Image

User avatar
SexY DeviL CJ
Mod Tester
Mod Tester
Posts: 73
Joined: 6 years ago
Contact:

#38

Post by SexY DeviL CJ » 5 years ago

XD not work i mean the plugin aint working as i need it
......Devil Was Here......

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#39

Post by Spir0x » 5 years ago

Bro read last reply raheem said don't use it as i update it to v1.3

viewtopic.php?f=15&t=2750&start=10

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 3 guests