|
|
#1 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2009
Location: Israel
Posts: 1,178
Reputation: 16
|
-Kills Table Bonus- *This is my first ever tutorial,and also my first tutorial after a 6 months brake off scripting,so I still might have a few mistakes,just correct me if you spot them* Well anyhow,I will teach you in here how give a play a bonus,if he has filled the kills table with his name If you didn't understand,then you will see later what I mean,I don't have a picture right now since my SA:MP does not work,sorry for that. Here we go: Start by putting those variables on the top of your gamemode/filterscript; pawn Code:
What do they mean? TopKiller - the person who is the top killer(..) TopKills - everytime the player kills someone,the TopKills will be increased by 1.Once the player has 5 TopKills ,he will fill the kills table and will get a bonus. Now,put this code in the OnPlayerDeath public. I will divide this code to 3 parts,and will explain to you about each and every part: pawn Code:
Now to the explanation: Part I pawn Code:
What does it do? It checks if the last killer is another player,and if it is,it resets the previous top killer's kills to 0 and starts counting the new top killer kills. Part II pawn Code:
Nothing much to explain,if the 'if' condition on the above does not exist (or whatever the right word is),then it adds +1 kill to the top killer kills count. Part III pawn Code:
This part is the most important part. It checks if the Top Killer has reached a total kills of 5,.If he had,then it gives him the bonus + sends him a message about his achievement (of course that you can change the amount of money he gets,that's off-topic so I will not explain about that) And that's pretty much it,I hope you like this tutorial And again,if you spot any mistake or have any question,don't hesitate to ask ![]() Greetings,Nuriel |
|
|
|
|
|
#2 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Mar 2011
Posts: 397
Reputation: 33
|
Nice tut
|
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2009
Location: Israel
Posts: 1,178
Reputation: 16
|
|
|
|
|
|
|
#4 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Mar 2011
Posts: 397
Reputation: 33
|
118 Views and No comments ... lol
|
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2009
Location: Israel
Posts: 1,178
Reputation: 16
|
|
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2011
Location: Athens, Greece
Posts: 1,104
Reputation: 100
|
Very nice tutorial man.
|
|
|
|
|
|
#7 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Mar 2011
Posts: 397
Reputation: 33
|
|
|
|
|
|
|
#8 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2009
Location: Israel
Posts: 1,178
Reputation: 16
|
|
|
|
|
|
|
#9 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Nov 2011
Location: -Sweet Home- Reputation:9999
Posts: 775
Reputation: 116
|
Nice tutorial
|
|
|
|
|
|
#10 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Sep 2011
Location: Bosnia & Herzegovina
Posts: 330
Reputation: 25
|
Nice tutorial.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Filling a String | Nonameman | Help Archive | 6 | 22/08/2010 09:07 PM |
| Error the needs filling | thekingman100 | Help Archive | 5 | 09/08/2010 09:17 AM |
| Health filling bug | XtremeChio | Help Archive | 1 | 05/08/2009 02:07 PM |