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

[ZP] Extra item: Buy a Frag with Ammo Packs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 05-11-2010 , 07:57   [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #1

Hello guys, new plugin: get_thread_name(id)


Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>
 
new g_frags
 
public plugin_init()
 register_plugin("[ZP] Buy a Frag", "1.0", "@bdul!")
 
public plugin_precache()
{
 g_frags = zp_register_extra_item("Buy a Frag", 5, ZP_TEAM_HUMAN)
}
 
public zp_extra_item_selected(id, itemid)
{
 if (itemid == g_frags)
  set_frags(id)
}
 
public set_frags(id)
{
 set_user_frags(id, get_user_frags(id) + 1)
 
 message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"))
 write_byte(id)// id
 write_short(get_user_frags(id) + 1)// frags
 write_short(get_user_deaths(id))// deaths
 write_short(0)// class?
 write_short(get_user_team(id))// team
 message_end()
}
__________________

Last edited by fiendshard; 05-12-2010 at 20:13.
fiendshard is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 05-11-2010 , 08:23   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #2

Here UNTESTED:
PHP Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>
 
new g_frags
 
public plugin_init()
 
register_plugin("[ZP] Buy a Frag""1.0""@bdul!")
 
public 
plugin_precache()
{
 
g_frags zp_register_extra_item("Buy a Frag"5ZP_TEAM_HUMAN)
}
 
public 
zp_extra_item_selected(iditemid)
{
 if (
itemid == g_frags)
  
set_frags(id)
}
 
public 
set_frags(id)
{
 
set_user_frags(idget_user_frags(id) + 1)
 
 
message_begin(MSG_BROADCASTget_user_msgid("ScoreInfo"))
 
write_byte(id)// id
 
write_short(get_user_frags(id) + 1)// frags
 
write_short(get_user_deaths(id))// deaths
 
write_short(0)// class?
 
write_short(get_user_team(id))// team
 
message_end()

Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_frags.sma - 638 views - 675 Bytes)
__________________

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 05-11-2010 , 08:43   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #3

yeah, it works

TO DO:

Sell a frag for ammo packs?
__________________
fiendshard is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 05-11-2010 , 08:50   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #4

Obviously when you have registered it in extra items then every thing else like checking ammo packs and other stuff will be handled by the main ZP plugin...!!
__________________

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
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-12-2010 , 01:02   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #5

Quote:
Originally Posted by abdul-rehman View Post
Obviously when you have registered it in extra items then every thing else like checking ammo packs and other stuff will be handled by the main ZP plugin...!!
is this a waste of ammo packs just to buy a frag?????
__________________
jc980 is offline
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 05-12-2010 , 07:21   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #6

Quote:
Originally Posted by jc980 View Post
is this a waste of ammo packs just to buy a frag?????
It is for noobs like you, who can't score at ZP server as well as with the girls
__________________
fiendshard is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 05-12-2010 , 08:14   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #7

Quote:
Originally Posted by fiendshard View Post
It is for noobs like you, who can't score at ZP server as well as with the girls
lolz

/ Good one
__________________

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
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-12-2010 , 09:32   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #8

Quote:
Originally Posted by fiendshard View Post
It is for noobs like you, who can't score at ZP server as well as with the girls
Im not a Noob, and girls can score too you know.
__________________
jc980 is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 05-12-2010 , 10:17   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #9

Quote:
Originally Posted by jc980 View Post
Im not a Noob, and girls can score too you know.
by scoring with the girls he meant to actually have a gf and do 'things' with her
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-13-2010 , 04:30   Re: [REQ] Help with [ZP] Extra item: Buy a Frag with Ammo Packs
Reply With Quote #10

Quote:
Originally Posted by georgik57 View Post
by scoring with the girls he meant to actually have a gf and do 'things' with her
thats not what im talking about.
__________________
jc980 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 10:21.


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