Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Saiyan Attack on Mar 10, 2017, 05:14 PM

Title: Detecting Player Into The Water
Post by: Saiyan Attack on Mar 10, 2017, 05:14 PM
hello everyone !!

as you can see the topic name explain everything for what i should do ... is there any possible way to detect ? I Tried to Geting Anim but it didn't work becoz I Have Just The Option Of Setting ...

function onPlayerHealthChange( player, oldhp, newhp )
{
if(player.SetAnim(0,156)) return MessagePlayer("You're Drowning You Need To learn How to swimming before to do Such type of stunt :P",player); // this for when player is drowing ...
}

I tried to edit with player.Pos.z function but failed :(
Becoz Map Heights Somewhere up and somewhere down ...

function onPlayerHealthChange( player, oldhp, newhp )
{
if(player.Pos.z.tofloat()<8.000) return MessagePlayer("You're Drowning You Need To learn How to swimming before to do that like of stunt :P",player); // this for when player is drowing ...
}

Sorry For My Bad English :(
Title: Re: Detecting Player Into The Water
Post by: MatheuS on Mar 10, 2017, 05:23 PM
if ( player.Pos.z <= GetWaterLevel() ) return MessagePlayer("You're Drowning You Need To learn How to swimming before to do that like of stunt :P",player); // this for when player is drowing ...
Title: Re: Detecting Player Into The Water
Post by: Saiyan Attack on Mar 11, 2017, 08:02 AM
Thanks :) @MatheuS
Title: Re: Detecting Player Into The Water
Post by: EK.IceFlake on Mar 11, 2017, 08:30 AM
This won't work on the underground tunnel near the military base.
Title: Re: Detecting Player Into The Water
Post by: vito on Mar 11, 2017, 08:39 AM
Quote from: EK.IceFlake on Mar 11, 2017, 08:30 AMThis won't work on the underground tunnel near the military base.
Then flood it using WATERPRO.DAT xD
Title: Re: Detecting Player Into The Water
Post by: kennedyarz on Mar 11, 2017, 01:15 PM
For what the boy wants to use this code? Is for swimming Could you tell me?
Title: Re: Detecting Player Into The Water
Post by: Saiyan Attack on Mar 11, 2017, 04:05 PM
lol @kennedyarz Noway I'm Making This Code For VIP's When Vip Player Drowning This Code Will Save VIP's Life :P Or The Others Get This Message ..
Title: Re: Detecting Player Into The Water
Post by: kennedyarz on Mar 11, 2017, 04:07 PM
Quote from: Saiyan Attack on Mar 11, 2017, 04:05 PMlol @kennedyarz Noway I'm Making This Code For VIP's When Vip Player Drowning This Code Will Save VIP's Life :P Or The Others Get This Message ..

The truth is that his idea is rare, but hey. What are we going to do. :V
Title: Re: Detecting Player Into The Water
Post by: Saiyan Attack on Mar 11, 2017, 11:57 PM
It's Simple Friend When VIP's Player drowning then he will come out from water without any lost of health ... for example If player drown location is haiti then he will come out near bank boat station ... if he drown in boat yard then he come out in boat yard station .... otherwise game will react as usualreutine ...
if you don't like my idea than what about swimming system :P ....
Title: Re: Detecting Player Into The Water
Post by: kennedyarz on Mar 12, 2017, 01:10 AM
The truth is that it's weird, but as you say, it's your theme you can do what you want as long as you do not break the rules
;)

And I did not understand the last -> if you don't like my idea than what about swimming system :P ....
Title: Re: Detecting Player Into The Water
Post by: Shadow on Mar 12, 2017, 01:41 AM
Quote from: kennedyarz on Mar 11, 2017, 04:07 PM
Quote from: Saiyan Attack on Mar 11, 2017, 04:05 PMlol @kennedyarz Noway I'm Making This Code For VIP's When Vip Player Drowning This Code Will Save VIP's Life :P Or The Others Get This Message ..

The truth is that his idea is rare, but hey. What are we going to do. :V

(https://i.gyazo.com/83a094ae267a8e8caabda76e8a86526e.png)

You asked me the exact same thing 5 days ago and now you complain that he does not have originality? Really...
Title: Re: Detecting Player Into The Water
Post by: kennedyarz on Mar 13, 2017, 04:59 PM
Quote from: Shadow on Mar 12, 2017, 01:41 AM
Quote from: kennedyarz on Mar 11, 2017, 04:07 PM
Quote from: Saiyan Attack on Mar 11, 2017, 04:05 PMlol @kennedyarz Noway I'm Making This Code For VIP's When Vip Player Drowning This Code Will Save VIP's Life :P Or The Others Get This Message ..

The truth is that his idea is rare, but hey. What are we going to do. :V

(https://i.gyazo.com/83a094ae267a8e8caabda76e8a86526e.png)

You asked me the exact same thing 5 days ago and now you complain that he does not have originality? Really...

Is wrong .. I did not tell him that he had no originality, he just wants to do something weird .. just for players Vip
Title: Re: Detecting Player Into The Water
Post by: Thijn on Mar 13, 2017, 05:07 PM
Quote from: kennedyarz on Mar 13, 2017, 04:59 PM
Quote from: Shadow on Mar 12, 2017, 01:41 AM
Quote from: kennedyarz on Mar 11, 2017, 04:07 PM
Quote from: Saiyan Attack on Mar 11, 2017, 04:05 PMlol @kennedyarz Noway I'm Making This Code For VIP's When Vip Player Drowning This Code Will Save VIP's Life :P Or The Others Get This Message ..

The truth is that his idea is rare, but hey. What are we going to do. :V

(https://i.gyazo.com/83a094ae267a8e8caabda76e8a86526e.png)

You asked me the exact same thing 5 days ago and now you complain that he does not have originality? Really...

Is wrong .. I did not tell him that he had no originality, he just wants to do something weird .. just for players Vip
How's that weird? Sounds like a useful feature for VIP players.
And then again, who are you to judge about a feature on his server? He just asked for some help. Either give him that, or don't post.
Title: Re: Detecting Player Into The Water
Post by: kennedyarz on Mar 14, 2017, 07:37 PM
Quote from: Thijn on Mar 13, 2017, 05:07 PM
Quote from: kennedyarz on Mar 13, 2017, 04:59 PM
Quote from: Shadow on Mar 12, 2017, 01:41 AM
Quote from: kennedyarz on Mar 11, 2017, 04:07 PM
Quote from: Saiyan Attack on Mar 11, 2017, 04:05 PMlol @kennedyarz Noway I'm Making This Code For VIP's When Vip Player Drowning This Code Will Save VIP's Life :P Or The Others Get This Message ..

The truth is that his idea is rare, but hey. What are we going to do. :V

(https://i.gyazo.com/83a094ae267a8e8caabda76e8a86526e.png)

You asked me the exact same thing 5 days ago and now you complain that he does not have originality? Really...

Is wrong .. I did not tell him that he had no originality, he just wants to do something weird .. just for players Vip
How's that weird? Sounds like a useful feature for VIP players.
And then again, who are you to judge about a feature on his server? He just asked for some help. Either give him that, or don't post.

interesting. I do not criticize, it just seems strange to me and already. Closed topic