Raised This Month: $ Target: $400
 0% 

kills.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-18-2009 , 05:05   kills.
Reply With Quote #1

Does anyone know how to make kills level ?

Example :

Player kill a player | Deagle |

Player kill 2 player | MP5 |

Player kill 3 player | AWP |

Meanings :

| Deagle |

| MP5 |

| AWP |

Those are weapons given to the player if they meet the kills level requirment. - Just like gun game.

But i just want the codes.
Mr.Noobie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-18-2009 , 06:10   Re: kills.
Reply With Quote #2

You are in scripting section, so you are here to learn.

Create a global var which will contain the kill by player. Next, hook the DeahMsg event, update the var and give weapon when needs. ( give_item() )
__________________
Arkshine is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-18-2009 , 06:14   Re: kills.
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
You are in scripting section, so you are here to learn.

Create a global var which will contain the kill by player. Next, hook the DeahMsg event, update the var and give weapon when needs. ( give_item() )
what do you mean by global var ?

can you show me some example codes ?
Mr.Noobie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-18-2009 , 06:32   Re: kills.
Reply With Quote #4

new MyGlobalVar[ 33 ]; // contains the kill by player.

public plugin_init()
{

}
__________________
Arkshine is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-18-2009 , 07:49   Re: kills.
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
new MyGlobalVar[ 33 ]; // contains the kill by player.

public plugin_init()
{

}

How do i contains the kill by player ??

Can you give me more example codes ?
Mr.Noobie is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 08-18-2009 , 14:38   Re: kills.
Reply With Quote #6

He's a sly one!
__________________
Bad_Bud is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-19-2009 , 06:28   Re: kills.
Reply With Quote #7

Quote:
Originally Posted by Bad_Bud View Post
He's a sly one!
So someone can help me ?

I don't know what to start first.
Mr.Noobie is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-21-2009 , 02:48   Re: kills.
Reply With Quote #8

Sorry for the double posting.

I really need some help on this.
Mr.Noobie is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 08-21-2009 , 05:03   Re: kills.
Reply With Quote #9

Quote:
Originally Posted by Bad_Bud View Post
He's a sly one!
u arent better ;)
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-21-2009 , 05:07   Re: kills.
Reply With Quote #10

Quote:
Originally Posted by Mr.Noobie View Post
How do i contains the kill by player ??

Can you give me more example codes ?
You should search too. There are a lot of examples on the forum.

Hook DeathMsg : register_event( "DeathMsg", "Event_PlayerKilled", "a" );

Then in the function Event_PlayerKilled, you can count the kills.

Code:
public Event_PlayerKilled() {      new Killer = read_data(1);      new Victim = read_data(2);      MyGlobalVar[ Killer ]++;  // We add +1 to the killer's kills. }
__________________
Arkshine 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 15:01.


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