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

Help :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bummps
Senior Member
Join Date: Mar 2009
Location: Brazil
Old 04-18-2009 , 11:26   Help :(
Reply With Quote #1

I want a plugin to do... a player only becomes zombie after death and help with this:

Quote:
I made a Noclip zombie with this code http://forums.alliedmods.net/showthread.php?t=87

but i have a problem, when a normal player select admin zombie this player will change to noob zombie just when die.

I need a command for kill the player if he isnt admin here:

Quote:
zp_set_user_zombie_class(id, g_normal)
[COMMAND FOR KILL PLAYER HERE]
client_print(id, print_chat, "[ZP] Sua classe e [Noob Zombie] porque voce nao e Admin.")
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombieplague>
#include <amxmodx>
new const zclass10_name[] = { "Admin Zombie" }
new const 
zclass10_info[] = { "(So para Admins)" }
new const 
zclass10_model[] = { "adm_mendez" }
new const 
zclass10_clawmodel[] = { "v_knife_nemesisR3.mdl" }
const 
zclass10_health 2000
const zclass10_speed 450
const Float:zclass10_gravity 0.6
const Float:zclass10_knockback 0.0
new const zname2[] = { "Noob Zombie" }
new const 
zinfo2[] = { "(Feito para voce !)" }  
new const 
zmodel2[] = { "zombie_source" }
new const 
zweapmodel2[] = { "v_knife_zombie.mdl" 
const 
zhealth2 1;  
const 
zspeed2 1;  
const 
Float:zgravity2 10.0;  
const 
Float:zknockback2 20.9;
new 
g_zclass10_noclipg_zclass_noclip_cooldowng_zclass_noclip_long
new Float:g_zclass_noclip_time[33]
new 
g_normal
public plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
register_cvar("zp_zclass_noclip_zombie",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
 
 
register_concmd("+noclip","cmd_noclip"ADMIN_USER"bind SHIFT +noclip")
 
register_clcmd("-noclip","cmd_off")
 
 
g_zclass_noclip_cooldown register_cvar("zp_noclip_cooldown""0.0")
 
g_zclass_noclip_long register_cvar("zp_noclip_long""999.0")
 
}
public 
plugin_precache() 
{
 
g_zclass10_noclip zp_register_zombie_class(zclass10_namezclass10_infozclass10_modelzclass10_clawmodelzclass10_healthzclass10_speedzclass10_gravityzclass10_knockback)
 
g_normal zp_register_zombie_class(zname2zinfo2zmodel2zweapmodel2zhealth2zspeed2zgravity2zknockback2);
}
public 
zp_user_infected_post(idinfector)  
{  
 
   if (
zp_get_user_zombie_class(id) == g_zclass10_noclip)  
   {  
       if (!
is_user_admin(id))  
    {  
    
zp_set_user_zombie_class(idg_normal)
    
client_print(idprint_chat"[ZP] Sua classe e [Noob Zombie] porque voce nao e Admin.")
 
    }  
    else {  
      
client_print(idprint_chat"[ZP] Voce selecionou [Admin Zombie]")  
    }  
 
 }  
}
public 
cmd_noclip(id)
{
 if (!
is_user_alive(id) || !zp_get_user_zombie(id))
  return 
PLUGIN_HANDLED
 
 
if (zp_get_user_zombie_class(id) != g_zclass10_noclip)
  return 
PLUGIN_CONTINUE
 
 fm_set_user_noclip
(id1)
 
 
g_zclass_noclip_time[id] = get_gametime()
 
 if (
get_gametime() - g_zclass_noclip_time[id] < get_pcvar_float(g_zclass_noclip_cooldown))
  return 
PLUGIN_HANDLED
 
 
return PLUGIN_CONTINUE
}
public 
cmd_off(id)
{
 if (!
is_user_alive(id) || !zp_get_user_zombie(id))
  return 
PLUGIN_HANDLED
 
 
if (zp_get_user_zombie_class(id) != g_zclass10_noclip)
  return 
PLUGIN_CONTINUE
 
 fm_set_user_noclip
(id0)
 
set_task(get_pcvar_float(g_zclass_noclip_long), "cmd_off"id)
 
 if (
get_gametime() - g_zclass_noclip_time[id] < get_pcvar_float(g_zclass_noclip_cooldown))
  return 
PLUGIN_HANDLED
 
 
return PLUGIN_CONTINUE
}
stock fm_set_user_noclip(indexnoclip 0
{
 
set_pev(indexpev_movetypenoclip == MOVETYPE_NOCLIP MOVETYPE_WALK);
 return 
1;
}
public 
check(id)
{
   if (
zp_get_user_zombie_class(id) == g_zclass10_noclip
 {
  new 
name[32]
  
get_user_name(idname31)
  
set_hudmessage(255000.050.4510.05.01.01.0, -1)
  
show_hudmessage(0"%s virou Admin Zombie !!!"name)
 }

Credits:

Noclip Zombie: http://forums.alliedmods.net/showthr...ghlight=Noclip
Admin Zombie & Noob Zombie: http://forums.alliedmods.net/showthread.php?t=87
__________________





Last edited by Bummps; 04-18-2009 at 11:41.
Bummps is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-18-2009 , 11:29   Re: Help :(
Reply With Quote #2

Gives more details, i do not understand well.
__________________
alan_el_more is offline
Anggara_nothing
Veteran Member
Join Date: Jan 2009
Location: Indonesia
Old 04-18-2009 , 11:35   Re: Help :(
Reply With Quote #3

Quote:
Originally Posted by alan_el_more View Post
Gives more details, i do not understand well.
he mean :
1. if a human death, he/she respawn as a zombie.
2. he need help with the special zombie class for admin.
Anggara_nothing is offline
Bummps
Senior Member
Join Date: Mar 2009
Location: Brazil
Old 04-18-2009 , 11:37   Re: Help :(
Reply With Quote #4

Example i'm CT and zombies killed me, i'll revive like a zombie
__________________




Bummps is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 04-18-2009 , 11:50   Re: Help :(
Reply With Quote #5

Quote:
Originally Posted by Bummps View Post
Example i'm CT and zombies killed me, i'll revive like a zombie
set the cvar zp_deathmatch to 2
__________________
alan_el_more is offline
Bummps
Senior Member
Join Date: Mar 2009
Location: Brazil
Old 04-18-2009 , 12:00   Re: Help :(
Reply With Quote #6

-.-

but zombie attack and human become zombie, i said if human DIE
__________________




Bummps 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 05:15.


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