Is this possible ?
#1

Hello guys , I'm new here, please excuse me if this is a stupid question.
(P.S. : thank God that you guys finally activated my account , Lol.)

Ok , so what I want to ask is :
I'm not a fan of football/basketball so I thinked of maybe trying something new.
This little idea come to my head : Handball.

My question is : How can I make my player/other players to do these animations?
I mean , the ball is in the center. How to do that when the player picks up the ball
(using left click) , then he throws to another guy , another... etc , and then goal ,
or out.. etc .. ?

Note : Just like in FootBall Servers but with hand , everything with hand , not with foot.
Note 2 : Also ,note that my server is not a handball server only , it's for some events
(it's like a RP+FUN Server) , I didn't look up but I think there is a "if(PlayerInPos)" or
"if(PlayerInPos) if(KEY_LMB) //do something" (I don't know if this exists , lol xD) or
something like that? I mean do all these things just in that place.

P.S : I'm sure you guys are like : "WTF IS THIS GUY TRYING TO SAY" ?
Just a little explain of what I said : I want a Handball fs if it's possible.
P.S 2 : I searched on the forum and nothing.

Please help

-jNkk.
Reply
#2

Nice idea, but also some work.

Basically you can use IsPlayerInRangeOfPoint(playerid, coords of the ball object) in OnPlayerKeyStateChange to detect if the player is near the ball when clicking. Use a variable to store the id of the player who holds the ball, so you can check if a player holds the ball when clicking (so you can differentiate between picking up the ball and throwing the ball).
For throwing and passing wups' OnPlayerShootPlayer include could help. When a player throws the ball, check if he is looking at a player (pass the ball to him) or if not, throw the ball in the direction he looks. Making the ball fly smooth will be the most difficult part. You dont want it to fly in a straight line I think, so you will have to calculate its position.
Playing some animations for throwing, catching etc will be the easy part, when everything else runs fine.

That should give you a basic idea of what to do. You could also check other ball game scripts for more script orientated ideas, there is a basketball script released here I think.
Reply
#3

Thanks , I apreciate your answer, it's just a very good answer.
I understand what you say , but I'm not very good at positioning the scripts
I mean , can someone give me a full script ?

If you guys can't I'll try to do what I can
Again , thanks very much for answer(s),

-jNkk
Reply
#4

That is really really really hard.
I wouldn't recommend you to start buiding that if you are a beginner,it takes a lot of time and affort.
Perhaps you can suggest this to an expert so he will build it and post it in the forum
Reply
#5

Ok. Thanks very much guys, I think I will do football on my server.

-jNkk
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)