AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   API Scripting Help [Tut] Creating Item With Limit (https://forums.alliedmods.net/showthread.php?t=205724)

H.RED.ZONE 01-13-2013 18:48

[Tut] Creating Item With Limit
 
This is a requested tutorial.

--------------------------------------------------
Info:
I will make this as simple as i can from the start to finish.
Makeing extra item for zombies that will give them evolution in type of more HP and so on.
Nothing to complicated step by step.
--------------------------------------------------





--------------------------------------------------

1. Start (Setting Autor Plugin Name And Version)
--------------------------------------------------
Spoiler






--------------------------------------------------
2. Item Setting up (Adding item to the zp 5.0 Menu)
--------------------------------------------------
Spoiler






--------------------------------------------------
NOTE:
Now you will have an error in that code that item id is not used.
So lets use it in zp forwards.
--------------------------------------------------





--------------------------------------------------
3. ZP Forwards.
--------------------------------------------------
We have 2 forwards that we use in item so lets start with First one.
I. "zp_fw_items_select_post" Lets add it.
Spoiler






--------------------------------------------------
4. Adding who has item.

--------------------------------------------------
Adding second part this is a part that can set what player can buy item and limit to item same as who can take item and so on :)
II. "zp_fw_items_select_pre"
Spoiler







--------------------------------------------------
5. Adding Limit to item.
--------------------------------------------------
Info: Limit is added to item in "zp_fw_items_select_pre"
So now i will show you.
The first one is for single player so it will not limit for whole team.



I. Single Player Limit.
Spoiler

II. For Whole Team
Spoiler




Full code for evolution item.
1 Player.
Spoiler


Whole Team.
Spoiler


Any questions post comments.

wicho 01-13-2013 21:00

Re: [Tut] Creating Item With Limit
 
Nice, thx for the tut maybe u can made one about how to made a human class with a especial skill..

airidas338 01-14-2013 09:45

Re: [Tut] Creating Item With Limit
 
Thanks

myusername 01-14-2013 10:39

Re: [Tut] Creating Item With Limit
 
Very thankfull. Good job.

alter 01-18-2013 13:19

Re: [Tut] Creating Item With Limit
 
I tryd to set limit, but its showing only my extra item, without "[0/1]"
Tested your script: same problem, please fix it

bat 01-19-2013 01:43

Re: [Tut] Creating Item With Limit
 
RED.ZONE nice work

H.RED.ZONE 01-19-2013 06:06

Re: [Tut] Creating Item With Limit
 
1 Attachment(s)
Quote:

Originally Posted by alter (Post 1875660)
I tryd to set limit, but its showing only my extra item, without "[0/1]"
Tested your script: same problem, please fix it

Try the code here it is. I tested it works.

alter 01-19-2013 07:42

Re: [Tut] Creating Item With Limit
 
This one works.

Gam3ronE 01-21-2013 06:39

Re: [Tut] Creating Item With Limit
 
Good job H.RED.ZONE! Thank you for taking the time to make this tutorial.

H.RED.ZONE 01-21-2013 13:16

Re: [Tut] Creating Item With Limit
 
Quote:

Originally Posted by Gam3ronE (Post 1877362)
Good job H.RED.ZONE! Thank you for taking the time to make this tutorial.

Thank you (:

--------------------------------------------------

I will make some more tutorials when i get time.


All times are GMT -4. The time now is 05:00.

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