[ZE] Shop Skin Vip System

Unpaid Requests, Public Plugins
Post Reply
Mystic Viper
Senior Member
Senior Member
Romania
Posts: 104
Joined: 1 Year Ago
Has thanked: 1 time
Been thanked: 3 times
Contact:

[ZE] Shop Skin Vip System

#1

Post by Mystic Viper » 8 Months Ago

Can somebody make a plugin with shop where vip humans(not zombies) with flag T can choose his skin player? And can i add to shop my personalise skins

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 209
Joined: 2 Years Ago
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#2

Post by sPe3doN » 8 Months Ago

Mystic Viper wrote:
8 Months Ago
Can somebody make a plugin with shop where vip humans(not zombies) with flag T can choose his skin player? And can i add to shop my personalise skins
Try this it's already made by spirox

Code: Select all

#include <zombie_escape>
#include <ze_vip>
 
new g_pCvarUseTimes
new g_iUsedTimes[33]
new bool:g_bHaloO[33], bool:g_bHaloW[33], bool:g_bHaloB[33], bool:g_bHaloR[33]
 
public plugin_natives()
{
    register_native("ze_open_skin_menu", "native_ze_open_skin_menu", 1)
}
 
public plugin_init()
{
    register_plugin("[ZE] Skins", "1.1", "Spi")
    g_pCvarUseTimes = register_cvar("ze_skin_menu_used", "1")
}
public plugin_precache()
{
    precache_model("models/player/Halo_O/Halo_O.mdl")
    precache_model("models/player/Halo_W/Halo_W.mdl")
    precache_model("models/player/Halo_B/Halo_B.mdl")
    precache_model("models/player/Halo_R/Halo_R.mdl")
}
 
public ze_user_humanized(id)
{
  g_iUsedTimes[id] = 0
 
  if (g_bHaloO[id])
  {
      rg_set_user_model(id, "Halo_O")
  }
  else if (g_bHaloW[id])
  {
      rg_set_user_model(id, "Halo_W")
  }
  else if (g_bHaloB[id])
  {
      rg_set_user_model(id, "Halo_B")
  }
  else if (g_bHaloR[id])
  {
      rg_set_user_model(id, "Halo_R")
  }
}
 
public model_menu(id)
{
    if (ze_is_user_zombie(id))
    {
        ze_colored_print(id, "!tYou can't change your skin while you are zombie!y.")
        return PLUGIN_HANDLED
    }
    if (g_iUsedTimes[id] >= get_pcvar_num(g_pCvarUseTimes))
    {
        ze_colored_print(id, "!tYou have already changed your !gskin!y!")
        return PLUGIN_HANDLED
    }
    else if (ze_get_vip_flags(id) & VIP_T)
    {
        ze_colored_print(id, "!tNo access!y.")
        return PLUGIN_HANDLED
    }
    else
    {
        new menu = menu_create("\r[\wSkins Menu\r]\r", "menu_wybierz")
   
        menu_additem(menu, "\wHalo \y| \rOrange", "1", 0)
        menu_additem(menu, "\wHalo \y| \rWhite", "2", 0)
        menu_additem(menu, "\wHalo \y| \rBlue", "3", 0)
        menu_additem(menu, "\wHalo \y| \rRed", "4", 0)
 
   
        menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
        menu_display(id, menu, 0)
    }
    return PLUGIN_HANDLED
}
public menu_wybierz(id, menu, item)
{
    if (item == MENU_EXIT)
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    new data[20], iName[500]
    new acces, callback
    menu_item_getinfo(menu, item, acces, data,20, iName, 500, callback)
   
    new key = str_to_num(data)
   
    switch(key)
    {
       case 1 : {
        rg_set_user_model(id, "Halo_O")
        ze_colored_print(id, "!tYou picked the !gOrange Halo Skin!y!", id)
        g_iUsedTimes[id]++
        g_bHaloO[id] = true
        g_bHaloW[id] = false
        g_bHaloB[id] = false
        g_bHaloR[id] = false
        }
       case 2 : {
        rg_set_user_model(id, "Halo_W")
        ze_colored_print(id, "!tYou picked the !gWhite Halo Skin!y!", id)
        g_iUsedTimes[id]++
        g_bHaloO[id] = false
        g_bHaloW[id] = true
        g_bHaloB[id] = false
        g_bHaloR[id] = false
        }
       case 3 : {
        rg_set_user_model(id, "Halo_B")
        ze_colored_print(id, "!tYou picked the !gBlue Halo Skin!y!", id)
        g_iUsedTimes[id]++
        g_bHaloO[id] = false
        g_bHaloW[id] = false
        g_bHaloB[id] = true
        g_bHaloR[id] = false
        }
       case 4 : {
        rg_set_user_model(id, "Halo_R")
        ze_colored_print(id, "!tYou picked the !gRed Halo Skin!y!", id)
        g_iUsedTimes[id]++
        g_bHaloO[id] = false
        g_bHaloW[id] = false
        g_bHaloB[id] = false
        g_bHaloR[id] = true
        }
    }
    menu_destroy(menu)
    return PLUGIN_HANDLED
}  
public native_ze_open_skin_menu(id)
{
    model_menu(id)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
*/

[ Post made via Android ]

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests