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

[ZP] Select models


Post New Thread Reply   
 
Thread Tools Display Modes
tlch0324
Senior Member
Join Date: Jan 2007
Old 04-21-2009 , 09:56   Re: [ZP] Select models
Reply With Quote #11

If I only use 4 models
How to change it?
tlch0324 is offline
tlch0324
Senior Member
Join Date: Jan 2007
Old 04-21-2009 , 10:26   Re: [ZP] Select models
Reply With Quote #12

I have change test it but it doesn't work . It can shows the menu but i can't choose the model.I press 1 , 2 , 3 , 4 but no react
tlch0324 is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-21-2009 , 10:46   Re: [ZP] Select models
Reply With Quote #13

Quote:
Originally Posted by tlch0324 View Post
I have change test it but it doesn't work . It can shows the menu but i can't choose the model.I press 1 , 2 , 3 , 4 but no react
do you change something ??? if yes, post your sma.
Anggara_nothing is offline
tlch0324
Senior Member
Join Date: Jan 2007
Old 04-21-2009 , 12:01   Re: [ZP] Select models
Reply With Quote #14

Just change some print chat and model name
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <fakemeta>
#include <fun>
new g_ent_playermodel[33]
new 
MenuKeys = (<< 0) + (<< 1) + (<< 2) + (<< 3) + (<< 4)
new 
BuyMenuBodyText[256]
public 
plugin_init()
{
 
register_plugin("[ZP] Select Models""1.0""Anggara_nothing")
 
SetupSelectMenu()
 
register_clcmd("models""ClCmdSelectModel")
 
register_menucmd(register_menuid("\rSelect the model:"), MenuKeys"SelectIt")
}
public 
plugin_precache()
{
 
// Change your models here.
        
engfunc(EngFunc_PrecacheModel"models/player/Francis/Francis.mdl")
        
engfunc(EngFunc_PrecacheModel"models/player/Bill/Bill.mdl")
        
engfunc(EngFunc_PrecacheModel"models/player/Louis/Louis.mdl")
 
engfunc(EngFunc_PrecacheModel"models/player/Zoey/Zoey.mdl")
}
// User Infected forward
public zp_user_infected_post(idinfector)
{
 
// remove the glow.
 
set_user_rendering(idkRenderFxNone0,0,0,kRenderNormal255)
 
 
// Remove Custom Model Entities
 
fm_remove_model_ents(id)
}
public 
ClCmdSelectModel(id)
{
 if(
zp_get_user_zombie(id) || zp_get_user_nemesis(id))
 {
  
client_print(idprint_chat"Only for human.")
  
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
  
show_hudmessage(id"Only for human.")
  return 
PLUGIN_HANDLED;
 }
 else if(!
is_user_alive(id))
 {
  
client_print(idprint_chat"Do it when you alive.")
  
set_hudmessage(2001550, -1.00.5006.08.00.30.53)
  
show_hudmessage(id"Do it when you alive.")
  return 
PLUGIN_HANDLED;
 }
 
SetupSelectMenu()
 
show_menu(idMenuKeysBuyMenuBodyText)
 return 
PLUGIN_CONTINUE;
}
public 
SelectIt(idkey)
{
 switch (
key)
 {
  case 
0:
  {
   
fm_remove_model_ents(id)
   if (!
pev_valid(g_ent_playermodel[id]))
   {
    
g_ent_playermodel[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
    if (!
pev_valid(g_ent_playermodel[id])) return ;
    
    
set_user_rendering(idkRenderFxNone255255255kRenderTransTexture1)
    
set_pev(g_ent_playermodel[id], pev_classname"player_model")
    
set_pev(g_ent_playermodel[id], pev_movetypeMOVETYPE_FOLLOW)
    
set_pev(g_ent_playermodel[id], pev_aimentid)
    
set_pev(g_ent_playermodel[id], pev_ownerid)
    
// and change this.
    
engfunc(EngFunc_SetModelg_ent_playermodel[id], "models/player/Francis/Francis.mdl")
   }
  }
  case 
1:
  {
   
fm_remove_model_ents(id)
   if (!
pev_valid(g_ent_playermodel[id]))
   {
    
g_ent_playermodel[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
    if (!
pev_valid(g_ent_playermodel[id])) return ;
    
    
set_user_rendering(idkRenderFxNone255255255kRenderTransTexture1)
    
set_pev(g_ent_playermodel[id], pev_classname"player_model")
    
set_pev(g_ent_playermodel[id], pev_movetypeMOVETYPE_FOLLOW)
    
set_pev(g_ent_playermodel[id], pev_aimentid)
    
set_pev(g_ent_playermodel[id], pev_ownerid)
    
// and change this.
    
engfunc(EngFunc_SetModelg_ent_playermodel[id], "models/player/Bill/Bill.mdl")
   }
  }
  case 
2:
  {
   
fm_remove_model_ents(id)
   if (!
pev_valid(g_ent_playermodel[id]))
   {
    
g_ent_playermodel[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
    if (!
pev_valid(g_ent_playermodel[id])) return ;
    
    
set_user_rendering(idkRenderFxNone255255255kRenderTransTexture1)
    
set_pev(g_ent_playermodel[id], pev_classname"player_model")
    
set_pev(g_ent_playermodel[id], pev_movetypeMOVETYPE_FOLLOW)
    
set_pev(g_ent_playermodel[id], pev_aimentid)
    
set_pev(g_ent_playermodel[id], pev_ownerid)
    
// and change this.
    
engfunc(EngFunc_SetModelg_ent_playermodel[id], "models/player/Louis/Louis.mdl")
   }
  }
                case 
3:
  {
   
fm_remove_model_ents(id)
   if (!
pev_valid(g_ent_playermodel[id]))
   {
    
g_ent_playermodel[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
    if (!
pev_valid(g_ent_playermodel[id])) return ;
    
    
set_user_rendering(idkRenderFxNone255255255kRenderTransTexture1)
    
set_pev(g_ent_playermodel[id], pev_classname"player_model")
    
set_pev(g_ent_playermodel[id], pev_movetypeMOVETYPE_FOLLOW)
    
set_pev(g_ent_playermodel[id], pev_aimentid)
    
set_pev(g_ent_playermodel[id], pev_ownerid)
    
// and change this.
    
engfunc(EngFunc_SetModelg_ent_playermodel[id], "models/player/Zoey/Zoey.mdl")
   }
  }
  case 
9: return ;
 }
 
 
ClCmdSelectModel(id)
 return;
}
public 
SetupSelectMenu()
{
 new 
menuLen format(BuyMenuBodyText255"\rSelect the model:^n^n")
 
menuLen += format(BuyMenuBodyText[menuLen], 255 menuLen"\w1. Francis^n")
 
menuLen += format(BuyMenuBodyText[menuLen], 255 menuLen"\w2. Bill^n")
 
menuLen += format(BuyMenuBodyText[menuLen], 255 menuLen"\w3. Louis^n")
 
menuLen += format(BuyMenuBodyText[menuLen], 255 menuLen"\w4. Zoey^n")
 
menuLen += format(BuyMenuBodyText[menuLen], 255 menuLen"\w0. Exit")
 return 
1
}
// Remove Custom Model Entities
stock fm_remove_model_ents(id)
{
 
// Remove "playermodel" ent if present
 
if (pev_valid(g_ent_playermodel[id]))
 {
  
engfunc(EngFunc_RemoveEntityg_ent_playermodel[id])
  
g_ent_playermodel[id] = 0
 
}

tlch0324 is offline
tlch0324
Senior Member
Join Date: Jan 2007
Old 04-26-2009 , 09:23   Re: [ZP] Select models
Reply With Quote #15

Why the model no change after I choose?
tlch0324 is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-26-2009 , 10:09   Re: [ZP] Select models
Reply With Quote #16

Quote:
case 9: return ;
--->
Quote:
case 4: return ;
Anggara_nothing is offline
tlch0324
Senior Member
Join Date: Jan 2007
Old 04-26-2009 , 11:57   Re: [ZP] Select models
Reply With Quote #17

Quote:
Originally Posted by Anggara_nothing View Post
--->
change the code
can show menu
can't change model
tlch0324 is offline
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 04-26-2009 , 22:59   Re: [ZP] Select models
Reply With Quote #18

Hey, Aggara, did you fix bug your plugin ?
__________________
albert123 is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-26-2009 , 23:02   Re: [ZP] Select models
Reply With Quote #19

Quote:
Originally Posted by albert123 View Post
Hey, Aggara, did you fix bug your plugin ?
Whats bug ?
can you tell me ?
Anggara_nothing is offline
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 04-26-2009 , 23:06   Re: [ZP] Select models
Reply With Quote #20

I want to change some model in your plugin ( Model of Resident Evil ). I worry about bug and i want to add more model so i must ask you this idead !
__________________
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 04:44.


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