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

Help / Support [T] How to Give Any Extra Item to Survivor


Post New Thread Reply   
 
Thread Tools Display Modes
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-03-2014 , 07:55   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #11

Quote:
Originally Posted by ZPhugeFan View Post
Haven't tested yet but I'm sure it will work ;)
If it does not work as expected, just inform me. There are still other ways to do it.

However, the steps that I have given is the easiest way (as far as I know).
zmd94 is offline
ZPhugeFan
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 08-04-2014 , 06:59   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #12

Quote:
Originally Posted by zmd94 View Post
If it does not work as expected, just inform me.
Tested it and works
ZPhugeFan is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-04-2014 , 11:59   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #13

New update!
Quote:
Adding Extra item: Ethereal_v2 (for Survivor)
You can change the weapon mode from Laser mode into Electric mode and vice versa. Just press [E] button.
Quote:
Don't forget to download the resources file.
If you want it, just click here.

zmd94 is offline
ZPhugeFan
Senior Member
Join Date: Jul 2013
Location: Bulgaria
Old 09-04-2014 , 16:57   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #14

Awesome!!! Keep bringing on the good stuff ;)
__________________
My tut
_______________________________________
ZPhugeFan is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-04-2014 , 19:20   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #15

Quote:
Originally Posted by ZPhugeFan View Post
Keep bringing on the good stuff ;)
Certainly. I will do my best to help the community.
zmd94 is offline
New.ZM.Life
Veteran Member
Join Date: Sep 2014
Location: Iran
Old 11-26-2014 , 09:22   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #16

سلام علیکم
I created a plasma class with natives and all functions like survivor and sniper!

I give plasma weapon to my plasma using this tutorial

https://forums.alliedmods.net/showthread.php?t=245378

But,there is some problems

If I turn someone to plasma before round start,every thing working perfectly,plasma weapon given to plasma and he can kill zombies

But,if I turn someone to plasma,after round start,nothing happen,no weapon given to him
What is problem?

public zp_round_started() need to be change?or something else?
__________________
PLUGINS

Zombie Plague 5.0 + New Modes

Added NightCrawler Mode to ZP





New.ZM.Life is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-26-2014 , 09:35   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #17

How you add the code to give the plasma gun?
zmd94 is offline
New.ZM.Life
Veteran Member
Join Date: Sep 2014
Location: Iran
Old 11-26-2014 , 09:58   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #18

its the code...

the native,zp_class_plasma_get(id) i created and already exist
the plasma gun give if i start a plasma round but do not give if i turn someone to plasma after round start(for example,if i turn someone to plasma during infection mode,he dont get plasma gun)
Attached Files
File Type: sma Get Plugin or Get Source (zp50_plasma_gun.sma - 288 views - 13.1 KB)
__________________
PLUGINS

Zombie Plague 5.0 + New Modes

Added NightCrawler Mode to ZP





New.ZM.Life is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-26-2014 , 10:39   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #19

Just use register_clcmd("drop", "clcmd_drop"). Then, add a code to find whether the player is using plasma class.

Next, add a code to give the plasma gun. ;)
PHP Code:
public plugin_init()
{
    
register_clcmd("drop""clcmd_drop")
}

public 
clcmd_drop(id)
{
    if(
is_user_alive(id) && zp_class_plasma_get(id))
    {
        
g_HasRifle[id] = true
        give_item
(id"weapon_famas")
    }

This code will required the player to press drop button first. ;)

However, there is still other way to do it.

Last edited by zmd94; 11-26-2014 at 11:39.
zmd94 is offline
New.ZM.Life
Veteran Member
Join Date: Sep 2014
Location: Iran
Old 11-26-2014 , 11:31   Re: [TUT] How to Give Any Extra Item to Survivor
Reply With Quote #20

Doesnt work

Now no weapon give to plasma class
Can it be done by giving plasma gun automatically to plasma?without any requirements,like this tutorial?
This tutorial work fine only before mode start

Problem is forward zp_round_started()
There is no forward to use instead of this forward?
Please help I really need this to working my class perfectly
__________________
PLUGINS

Zombie Plague 5.0 + New Modes

Added NightCrawler Mode to ZP





New.ZM.Life is offline
Reply


Thread Tools
Display Modes

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:42.


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