AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] ZCLASS = SMOKER L4D2 3.0 BETA 2 (JAN 2012 UPDATE!) (https://forums.alliedmods.net/showthread.php?t=167433)

Snaker beatter 09-15-2011 21:45

[ZP] ZCLASS = SMOKER L4D2 3.0 BETA 2 (JAN 2012 UPDATE!)
 
2 Attachment(s)
Quote:

Zombie Class: Smoker L4D2
Beta 2 by snaker beatter

Quote:

* Description:
Another plugin for Zombie Plague (4.3 or 5.0).
This zombie class can drag players using hes tongue,
smoker class does just like in left 4 dead 2.

Quote:

* Features:
^ Uses long tongue to drag players ^
^ Uses damage smoke ^
^ Uses dead smoke to blind players when he dies ^

^ No move when tongued ^
Much more!

Quote:

* Credits:
Isaac999 - reporting errors
Excalibur - Blinding code

Quote:

* Change log:
OLD CHANGELOG IS DELETED
3.0 Beta 1:
1. Fix runtime errors
2. Fix tongue damage to stop not working!
3. NOW USES NEW CODES!
3.0 Beta 2:
1. Fix runtime errors again

Quote:

* Reporting bugs:
Before you report bugs, make sure:
1. If you want to drag on E make sure its binded to +use (bind e +use on console)
2. If you want a key other than "E", write this on console: "bind <key> +l4d_tongue"
3. If +use(E) key not working on you, read this http://forums.alliedmods.net/showpos...1&postcount=90


JoKeR LauGh 09-16-2011 02:36

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
-.- ....
this is wrong....
PHP Code:

register_clcmd("+smoker_tongue","tongue_start"

PHP Code:

register_clcmd("-smoker_tongue","tongue_end"

why you need to hook tongue_end ? the button is only to start an ability and you still wrong , its should be like this.

PHP Code:

register_clcmd("drop""tongue_start"

the
PHP Code:

"drop" 

is for hooking a key means
PHP Code:

"drop" 

is for G key ,
PHP Code:

"cheer" 

for J . You only can hook a button that you have put like
PHP Code:

"use" 

is for E button and something like that and see your keyboard options in your cstrike , options -> keyboard .

DSASDFGH 09-16-2011 03:56

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
Quote:

Originally Posted by JoKeR LauGh (Post 1556214)
-.- ....
this is wrong....
PHP Code:

register_clcmd("+smoker_tongue","tongue_start"

PHP Code:

register_clcmd("-smoker_tongue","tongue_end"

why you need to hook tongue_end ? the button is only to start an ability and you still wrong , its should be like this.

PHP Code:

register_clcmd("drop""tongue_start"

the
PHP Code:

"drop" 

is for hooking a key means
PHP Code:

"drop" 

is for G key ,
PHP Code:

"cheer" 

for J . You only can hook a button that you have put like
PHP Code:

"use" 

is for E button and something like that and see your keyboard options in your cstrike , options -> keyboard .

Don't forget to bind default keys.

PHP Code:

client_cmd(id "bind g drop")
client_cmd(id "bind e +use"


JoKeR LauGh 09-16-2011 03:59

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
Here

yokomo 09-16-2011 05:03

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
Quote:

Originally Posted by DSASDFGH (Post 1556245)
Don't forget to bind default keys.

PHP Code:

client_cmd(id "bind g drop")
client_cmd(id "bind e +use"


Not all people use g as drop button, so no need to bind it :)

Snaker beatter 09-16-2011 05:19

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
Quote:

Originally Posted by DSASDFGH (Post 1556245)
Don't forget to bind default keys.

PHP Code:

client_cmd(id "bind g drop")
client_cmd(id "bind e +use"


Quote:

Originally Posted by JoKeR LauGh (Post 1556214)
-.- ....
this is wrong....
PHP Code:

register_clcmd("+smoker_tongue","tongue_start"

PHP Code:

register_clcmd("-smoker_tongue","tongue_end"

why you need to hook tongue_end ? the button is only to start an ability and you still wrong , its should be like this.

PHP Code:

register_clcmd("drop""tongue_start"

the
PHP Code:

"drop" 

is for hooking a key means
PHP Code:

"drop" 

is for G key ,
PHP Code:

"cheer" 

for J . You only can hook a button that you have put like
PHP Code:

"use" 

is for E button and something like that and see your keyboard options in your cstrike , options -> keyboard .

Quote:

Originally Posted by JoKeR LauGh (Post 1556247)

Quote:

Originally Posted by yokomo (Post 1556269)
Not all people use g as drop button, so no need to bind it :)

GUYS OR GIRLS! REDOWNLOAD!!! I CHANGE THE SLOW-HACKING CODE YOU TELL ME IN TO "IN_USE" KEY (SUCH US E KEY)

JoKeR LauGh 09-16-2011 09:47

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
Quote:

Originally Posted by yokomo (Post 1556269)
Not all people use g as drop button, so no need to bind it :)

@yokomo

MY : yokomo . asal bile aku hook drop key aku dan aku x leh drop senjata? drop key aku 'g' . Tapi bile pakai zombie elok lak . mungkin sbb aku 'bind g drop' kat console tapi mesti boleh drop senjata skali kan? anyway ,boleh x tolong aku dalam thread yng baru aku buat?

English : sorry , my problems :3

yokomo 09-16-2011 11:21

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
Quote:

Originally Posted by JoKeR LauGh (Post 1556406)
@yokomo

MY : yokomo . asal bile aku hook drop key aku dan aku x leh drop senjata? drop key aku 'g' . Tapi bile pakai zombie elok lak . mungkin sbb aku 'bind g drop' kat console tapi mesti boleh drop senjata skali kan? anyway ,boleh x tolong aku dalam thread yng baru aku buat?

English : sorry , my problems :3

You are using a wrong return value.

Ok for example you can use this:
PHP Code:

public ZombieSkillCmd(id)
{
    
// User is dead/not connected
    
if (!is_user_alive(id)) return PLUGIN_CONTINUE
    
    
// User not a zombie/is nemesis
    
if (!zp_get_user_zombie(id) || zp_get_user_nemesis(id)) return PLUGIN_CONTINUE

    
// User zombie classes equal to our custom zombie
    
if (zp_get_user_zombie_class(id) == mycustomzombieclass[id])
    {
        
// Write your function/effect here
        
MyCustomZombieClassSkill(id)
        
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE



JoKeR LauGh 09-16-2011 23:22

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
like this? and can you tell me what's the different if we put ';' after we return a value? and why? I just put it as I see a lot of plugin use it and compile locally works fine
PHP Code:

public clcmd_drop(id)
{
    if (!
zp_get_user_zombie(id) || !is_user_alive(id) || zp_get_user_nemesis(id))
        return 
PLUGIN_CONTINUE;
    
    if(
zp_get_user_zombie_class(id) != g_iSirenZID)
        return 
PLUGIN_CONTINUE;
    
    if (
g_bCanDoScreams[id] && !g_bDoingScream[id] && !g_bRoundEnding)
    {
        
// Update bool
        
g_bInScreamProcess[id] = true
            
        
// Next scream time
        
set_task(g_iCvar_ScreamStartTime 0.2"task_do_scream"id+TASK_SCREAM)
         return 
PLUGIN_HANDLED;
    }
    else if (
g_bDoingScream[id])
    {
        
// Stop scream main task
        
stop_scream_task(id)
    }
    
    return 
PLUGIN_CONTINUE;



yokomo 09-17-2011 00:24

Re: [ZP] ZCLASS = SMOKER L4D2 (( 1.2 ( Sept 16, 2011 Updated) ))
 
Quote:

Originally Posted by JoKeR LauGh (Post 1556843)
like this? and can you tell me what's the different if we put ';' after we return a value? and why? I just put it as I see a lot of plugin use it and compile locally works fine
PHP Code:

public clcmd_drop(id)
{
    if (!
zp_get_user_zombie(id) || !is_user_alive(id) || zp_get_user_nemesis(id))
        return 
PLUGIN_CONTINUE;
    
    if(
zp_get_user_zombie_class(id) != g_iSirenZID)
        return 
PLUGIN_CONTINUE;
    
    if (
g_bCanDoScreams[id] && !g_bDoingScream[id] && !g_bRoundEnding)
    {
        
// Update bool
        
g_bInScreamProcess[id] = true
            
        
// Next scream time
        
set_task(g_iCvar_ScreamStartTime 0.2"task_do_scream"id+TASK_SCREAM)
         return 
PLUGIN_HANDLED;
    }
    else if (
g_bDoingScream[id])
    {
        
// Stop scream main task
        
stop_scream_task(id)
    }
    
    return 
PLUGIN_CONTINUE;



Your code is correct by the way, so what's the problem now?
PHP Code:

    if (!zp_get_user_zombie(id) || !is_user_alive(id) || zp_get_user_nemesis(id))
        return 
PLUGIN_CONTINUE

to
PHP Code:

    if (!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id))
        return 
PLUGIN_CONTINUE

The ; just like a fullstop as i know. So no need to put it.


All times are GMT -4. The time now is 16:33.

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