Raised This Month: $51 Target: $400
 12% 

[req] skins menu?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 12-17-2022 , 07:15   [req] skins menu?
Reply With Quote #1

Hi, I'm looking for something similar to this one
say /skins vip or admin can apply weapon skins for free.
thank you


https://postimg.cc/w7WyStL4

Last edited by popilas; 12-17-2022 at 07:16.
popilas is offline
Siska1
Senior Member
Join Date: Feb 2020
Location: BedRock
Old 12-17-2022 , 11:36   Re: [req] skins menu?
Reply With Quote #2

Basically with OciXCrom plugins you can do this...
__________________
Siska1 is offline
Send a message via Skype™ to Siska1
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 12-19-2022 , 16:50   Re: [req] skins menu?
Reply With Quote #3

Quote:
Originally Posted by Siska1 View Post
Basically with OciXCrom plugins you can do this...
can you tell me which one ?thank you
popilas is offline
shayan123
BANNED
Join Date: Oct 2020
Location: GB
Old 01-13-2023 , 11:52   Re: [req] skins menu?
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <cstrike>

#define VIP_FLAG "z" // change this to the flag for VIP players
#define ADMIN_FLAG "a" // change this to the flag for admin players

public plugin_init() {
    
register_plugin("Free Weapon Skins""1.0""Author")
    
register_clcmd("say /skins""cmd_skins")
}

public 
cmd_skins(id) {
    if (!
is_user_alive(id)) {
        
client_print(idprint_chat"You must be alive to use this command.")
        return 
PLUGIN_HANDLED
    
}
    if (!
get_user_flags(id) & VIP_FLAG && !get_user_flags(id) & ADMIN_FLAG) {
        
client_print(idprint_chat"You must be a VIP or admin to use this command.")
        return 
PLUGIN_HANDLED
    
}
    new 
weapon read_data(2)
    if (
weapon CSW_P228 || weapon CSW_M3) {
        
client_print(idprint_chat"Invalid weapon id.")
        return 
PLUGIN_HANDLED
    
}
    new 
skin[64]
    
read_args(skin63)
    if (!
skin) {
        
client_print(idprint_chat"Usage: /skins <weapon id> <skin>")
        return 
PLUGIN_HANDLED
    
}
    
engfunc(EngFunc_SetClientKeyValueidengfunc(EngFunc_GetPlayerWeaponSlotidweapon), "skin"skin)
    
client_print(idprint_chat"Weapon skin applied.")
    return 
PLUGIN_HANDLED

This plugin uses the register_clcmd function to register the command "/skins", which is then handled by the cmd_skins function. This function first checks if the player is alive, then checks if the player has the VIP or admin flag. If the player meets these requirements, the function then reads the weapon ID and skin from the command arguments, and sets the skin for the specified
shayan123 is offline
Send a message via ICQ to shayan123 Send a message via AIM to shayan123 Send a message via Yahoo to shayan123 Send a message via Skype™ to shayan123
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode