Raised This Month: $ Target: $400
 0% 

[ZP] Extra item: Thunder Knife


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 09-12-2010 , 21:07   Re: [HELP] [ZP] Extra item: Thunder Knife
Reply With Quote #1

You justt LOVE using static right

Got a question, does maxplayers just get hte max amount of players that are allowed int he server or the amount of players in the server at the moment?

Because I usuallly use get_players
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 09-13-2010 , 02:43   Re: [HELP] [ZP] Extra item: Thunder Knife
Reply With Quote #2

Quote:
Originally Posted by nikhilgupta345 View Post
You justt LOVE using static right

Got a question, does maxplayers just get hte max amount of players that are allowed int he server or the amount of players in the server at the moment?

Because I usuallly use get_players
Regarding static i will say that they are faster and act more like a global variable because they are only created once as you can see in the above code

And regarding max players, get_maxplayers() returns the maximum slots on the server and you can store this value as a global during plugin start since the to change the max player setting you need to restart your server
AND plz dont use get_players( ... ) bcoz it is resource ful and difficult
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 09-13-2010 , 07:09   Re: [ZP] Extra item: Thunder Knife
Reply With Quote #3

It is necessary to use STATIC bcoz static electricity is used in this knife
__________________
fiendshard is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 09-13-2010 , 18:43   Re: [ZP] Extra item: Thunder Knife
Reply With Quote #4

Code:
public zp_extra_item_selected(id, itemid)
{
    if (itemid == g_tknife)
    {
        havetk[id] = 1
        client_print(id, print_chat, "[ZP] You got Thunder Knife! Slash a Zombie to kill him with thunder")
    }
}
Change havetk[id] = 1.

Change the 1 to whatever number of uses you want the person to have. I asked for a cvar (i could make myself, but obviously he should or might release it because it is helpful to other people), so just wait for him to put it in. The work that I showed above will work though.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 09-13-2010 , 19:21   Re: [ZP] Extra item: Thunder Knife
Reply With Quote #5

Quote:
Originally Posted by nikhilgupta345 View Post
Code:
public zp_extra_item_selected(id, itemid)
{
    if (itemid == g_tknife)
    {
        havetk[id] = 1
        client_print(id, print_chat, "[ZP] You got Thunder Knife! Slash a Zombie to kill him with thunder")
    }
}
Change havetk[id] = 1.

Change the 1 to whatever number of uses you want the person to have. I asked for a cvar (i could make myself, but obviously he should or might release it because it is helpful to other people), so just wait for him to put it in. The work that I showed above will work though.
I did this, but the player stabbed and did just that purpose.
You can edit for me putting 20 uses and cost 30?
rodrigo286 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 16:26.


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