Raised This Month: $ Target: $400
 0% 

First time make sma ... help !!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RPDisNOOB
New Member
Join Date: Jan 2016
Old 01-05-2016 , 06:00   First time make sma ... help !!!
Reply With Quote #1

I want to make a change player model menu
help me ... thx !!!

Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <colorchat>

#define PLUGIN "RPD"
#define VERSION "1.0"
#define menu_create

public plugin_init()
{
register_plugin("RPD's插件", "1.0", "RPD")
register_clcmd("model", "rpd")
return PLUGIN_CONTINUE
}

public rpd(id)
{
new menu = menu_create("\r[RPD Model Menu]", "rpd_menu")
menu_additem(menu, "\wModel-1", "1", 0)
menu_additem(menu, "\wModel-2", "2", 0)
menu_additem(menu, "\wModel-3", "3", 0)
menu_additem(menu, "\wModel-4", "4", 0)

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)

menu_display(id, menu, 0)

}

public plugin_precache()
{
precache_model("models/player/vip/vip.mdl")
precache_model("models/player/admin1/admin1.mdl")
precache_model("models/player/admin2/admin2.mdl")
precache_model("models/player/admin3/admin3.mdl")

return PLUGIN_CONTINUE
}

public menu(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new acces, callback
menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)

new key = str_to_num(data)

switch(key)
{
case 1 :
{
client_print(id, print_chat, "你按了VIP");
cs_set_user_model(id, "vip")
}
case 2 : cs_set_user_model(id, "admin1")
case 3 : cs_set_user_model(id, "admin2")
case 4 : cs_set_user_model(id, "admin3")
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
Attached Images
File Type: jpg bandicam 2016-01-04 20-21-24-251.jpg (69.4 KB, 124 views)
Attached Files
File Type: sma Get Plugin or Get Source (rpdmodelmenu.sma - 557 views - 1.5 KB)

Last edited by RPDisNOOB; 01-05-2016 at 06:07.
RPDisNOOB is offline
 



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 09:20.


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