Raised This Month: $32 Target: $400
 8% 

[ZP] Select models


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-20-2009 , 00:20   [ZP] Select models
Reply With Quote #1

[ZP] Select models
Created By anggara_nothing.


Description :
You can change your model with this sub-plugin. say /models for showing the model menu. This ability is for human.

Credit :
MeRcyLeZZ ---> for his player model entity code.
alan_el_more and BOYSplayCS ---> for optimize the code.

Cvar :
zp_sem_enable ---> for enable the plug-in.

1.2 ---> correct the bugs.
Attached Files
File Type: sma Get Plugin or Get Source (zp_select_models.sma - 5934 views - 10.6 KB)

Last edited by Anggara_nothing; 04-25-2009 at 05:38.
Anggara_nothing is offline
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 04-20-2009 , 05:06   Re: [ZP] Select models
Reply With Quote #2

Add karma for you !
__________________
albert123 is offline
fenomen15
Junior Member
Join Date: Mar 2009
Old 04-20-2009 , 05:52   Re: [ZP] Select models
Reply With Quote #3

some screens pls
fenomen15 is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 04-20-2009 , 07:19   Re: [ZP] Select models
Reply With Quote #4

Hello, here are some suggestions:
  • Make it so it costs money to select a model
  • Create a cvar to control that option(on/off) and the amount of money.
I've looked through your code and everything looks okay, except to me, it seems you may be returning values too many times inside your public SelectIt(id, key).
BOYSplayCS is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-20-2009 , 07:31   Re: [ZP] Select models
Reply With Quote #5

PHP Code:
if(zp_get_user_zombie(id) || zp_get_user_nemesis(id))
    {
        
client_print(idprint_chat"This is just for human.")

        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"This is just for human.")
        return 
PLUGIN_HANDLED;
    }
    else if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"You must alive before using this.")

        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"You must alive before using this.")
        return 
PLUGIN_HANDLED;
    }

    
SetupSelectMenu()
    
show_menu(idMenuKeysBuyMenuBodyText)
    return 
PLUGIN_CONTINUE


PHP Code:
if(zp_get_user_zombie(id) || zp_get_user_nemesis(id))
    {
        
client_print(idprint_chat"This is just for human.")

        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"This is just for human.")
    }
    else if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"You must alive before using this.")

        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"You must alive before using this.")
    }
    else
    {
        
SetupSelectMenu()
        
show_menu(idMenuKeysBuyMenuBodyText)
    } 
__________________
alan_el_more is offline
Old 04-20-2009, 07:35
Anggara_nothing
This message has been deleted by Anggara_nothing. Reason: bump
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 04-20-2009 , 07:35   Re: [ZP] Select models
Reply With Quote #6

It may be better to do it like this:

PHP Code:
public ClCmdSelectModel(id)
{
    if(
zp_get_user_zombie(id) || zp_get_user_nemesis(id))
    {
        
client_print(idprint_chat"[ZP] This is just for human.")
        
        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"[ZP] This is just for human.")
    }
    else if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"[ZP] You must alive before using this.")
        
        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"[ZP] You must alive before using this.")
    }
    else
    {
        
SetupSelectMenu()
        
show_menu(idMenuKeysBuyMenuBodyText)
    } 
    return 
PLUGIN_CONTINUE

BOYSplayCS is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-20-2009 , 07:38   Re: [ZP] Select models
Reply With Quote #7

Quote:
Originally Posted by BOYSplayCS View Post
Hello, here are some suggestions:
  • Make it so it costs money to select a model
  • Create a cvar to control that option(on/off) and the amount of money.
I've looked through your code and everything looks okay, except to me, it seems you may be returning values too many times inside your public SelectIt(id, key).
can you fix it ?

edit:
Quote:
Make it so it costs money to select a model
maybe ammo packs, not money ?

EDIT2 :
Quote:
Create a cvar to control that option(on/off) and the amount of money.
i will edit that plugin, if anyone agree.

Last edited by Anggara_nothing; 04-20-2009 at 09:30.
Anggara_nothing is offline
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 04-20-2009 , 07:53   Re: [ZP] Select models
Reply With Quote #8

Quote:
Originally Posted by alan_el_more View Post
PHP Code:
if(zp_get_user_zombie(id) || zp_get_user_nemesis(id))
    {
        
client_print(idprint_chat"This is just for human.")
 
        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"This is just for human.")
        return 
PLUGIN_HANDLED;
    }
    else if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"You must alive before using this.")
 
        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"You must alive before using this.")
        return 
PLUGIN_HANDLED;
    }
 
    
SetupSelectMenu()
    
show_menu(idMenuKeysBuyMenuBodyText)
    return 
PLUGIN_CONTINUE


PHP Code:
if(zp_get_user_zombie(id) || zp_get_user_nemesis(id))
    {
        
client_print(idprint_chat"This is just for human.")
 
        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"This is just for human.")
    }
    else if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"You must alive before using this.")
 
        
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
        
show_hudmessage(id"You must alive before using this.")
    }
    else
    {
        
SetupSelectMenu()
        
show_menu(idMenuKeysBuyMenuBodyText)
    } 
I don't like this idea.
__________________
albert123 is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-20-2009 , 07:56   Re: [ZP] Select models
Reply With Quote #9

Quote:
Originally Posted by albert123 View Post
I don't like this idea.
why?
__________________
alan_el_more is offline
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 04-20-2009 , 07:59   Re: [ZP] Select models
Reply With Quote #10

Because it's not neccessary for changing model.
__________________
albert123 is offline
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 20:16.


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