[Include] first-blood.inc
#1

First Blood (v1.1)

View code and download: https://gist.github.com/AmirSavand/e...45576724f2d70c

Leave comments here or on the GitHub page if you have any questions/suggestions.


Installation

Just include it in the gamemode.


Usage

Watch OnPlayerFirstBlood(playerid, killedid) to handle first blood (announce, reward, etc.).


Example

PHP код:
hook OnPlayerFirstBlood(playeridkilledid)
{
    
printf("Player %i drew first blood by killing player %i"playeridkilledid);
    
// Reward player, announce, etc...

Reply
#2

what does it do? (I did not read github code)
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
what does it do? (I did not read github code)
It's ok to be lazy (I am too :P).

First player who kills another player triggers OnPlayerFirstBlood.
Reply
#4

but for example what would i need it for?
Reply
#5

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
but for example what would i need it for?
Could use it in a freeroam/DM server, give the player an advantage if he manages to get first blood.
Reply
#6

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
but for example what would i need it for?
In my game mode, I announce the player and give em $1000. There are lots of things you can do for player who draws blood!
Reply
#7

Quote:
Originally Posted by DTV
Посмотреть сообщение
Could use it in a freeroam/DM server, give the player an advantage if he manages to get first blood.
Yes, this is what lots of other multiplayer games do.
Reply
#8

This should be a snippet, not an include...
Reply
#9

I'm just gonna keep shitting on these threads till people start releasing code that makes sense.

So yeah shit code, shit concept and shit implementation, not even worth 1 star.

Because:
1- You didn't forward the function
2- Learn how to hook instead of telling people to use the function under OnPlayerDeath
3- No need to call the function locally and whats worse is you did it remotely which doesn't make any sense a direct call is what you should've went for.

And last but not least the concept is too relative and isn't even considered as a release.
Reply
#10

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
I'm just gonna keep shitting on these threads till people start releasing code that makes sense.
Is that really necessary? As simple as it is, it can still help someone who's starting, even if it's bad to begin with. While you have legitimate criticism, it also leaves a bad taste in their mouth when you say "your code's shit and here's why" rather than "you can improve this by..." so that they feel like you're not against them.
Reply
#11

Quote:
Originally Posted by DTV
Посмотреть сообщение
Is that really necessary? As simple as it is, it can still help someone who's starting, even if it's bad to begin with. While you have legitimate criticism, it also leaves a bad taste in their mouth when you say "your code's shit and here's why" rather than "you can improve this by..." so that they feel like you're not against them.
Yeah you're probably right, but i still gave legit criticism
Reply
#12

Unique, simple for those who use CoD scripts or others. Thanks!
Reply
#13

Below average. You should update the code.
Reply
#14

It's pretty funny, some are actually providing feedback and some just post nonsense and rate 1/5 without pointing out the flaws.

Again, this script is perfect for needs of mini-modes in my server. I just thought it would be cool to release it so some can benefit from it.

Thanks everyone for feedback, if you can send me updated code, I'd review and update ;)
Reply
#15

That's some great include, but you could have gone far with it given the ideas. Maybe make an include where you include more things. Anyway, great job.
Reply
#16

Quote:
Originally Posted by XStormiest
Посмотреть сообщение
That's some great include, but you could have gone far with it given the ideas. Maybe make an include where you include more things. Anyway, great job.
Thanks for the feedback!

I think this include serves its purpose. I don't understand what you mean by "Maybe make an include where you include more things."
Reply
#17

As a gamer, I’m disappointed by the number of people in this thread who have obviously never played Unreal Tournament…

As a mod, I’m disappointed by the number of people insulting each other instead of remaining civil despite potentially having legitimate concerns.
Reply
#18

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
As a mod, I’m disappointed by the number of people insulting each other instead of remaining civil despite potentially having legitimate concerns.
You should update the rules, and ban this toxic people...


OT: Great include!
Reply
#19

This looks neat, you can also avoid requirements for calling CheckFirstBlood by hooking that call to OnPlayerDeath

Take a look here
Reply
#20

Glad you like it guys!

Quote:
Originally Posted by CoaPsyFactor
Посмотреть сообщение
This looks neat, you can also avoid requirements for calling CheckFirstBlood by hooking that call to OnPlayerDeath

Take a look here
I know about the hooks but like I said, in my modes, OnPlayerDeath is not always the case but feel free to fork it and add the hook version too
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)