SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/01/2019, 05:15 PM   #1
Wajttachu
Little Clucker
 
Join Date: Oct 2018
Location: Belgrade, Serbia
Posts: 20
Reputation: 0
Default ColAndreas IsPlayerInWater problem

I'm experiencing annoying problem w/ ColAndreas...
I'm using .dll from releases page and working .inc (no warnings/errors) from master page...
So this is the problem, even tho player is like 1.0 above from water (Standing on object above water) it shows up he is in water...
HTML Code:
if(CA_IsPlayerInWater(playerid, -1.0, -1.0))
	{
		Server(playerid, "U vodi si!");
	}
if(CA_IsPlayerInWater(playerid, 0.0, 0.0))
	{
		Server(playerid, "U vodi si!");
	}

if(CA_IsPlayerInWater(playerid, 0.0, 0.0))
	{
		Server(playerid, "U vodi si!");
	}
Result was always same, here is photo:
https://imgur.com/a/oaiXj5H
__________________
Quote:
Originally Posted by Wajttachu View Post
If you do not know basics:
Hire scripter for money
...or if you are "poor", knowledge is free:
https://wiki.sa-mp.com/wiki/Scripting_Basics
Do not expect that someone would do these free, even if its 5min job
Wajttachu is offline   Reply With Quote
Old 27/01/2019, 06:53 PM   #2
Hunud
Huge Clucker
 
Hunud's Avatar
 
Join Date: Jun 2016
Location: Right here.
Posts: 484
Reputation: 57
Default Re: ColAndreas IsPlayerInWater problem

Checks if the animation/s applies when in water
Hunud is offline   Reply With Quote
Old 27/01/2019, 07:17 PM   #3
Wajttachu
Little Clucker
 
Join Date: Oct 2018
Location: Belgrade, Serbia
Posts: 20
Reputation: 0
Default Re: ColAndreas IsPlayerInWater problem

Quote:
Originally Posted by Hunud View Post
Checks if the animation/s applies when in water
I want to do it w/ colandreas
Also i need IsPlayerNearWater which is almost same checks as this for one job i'm doing ...
__________________
Quote:
Originally Posted by Wajttachu View Post
If you do not know basics:
Hire scripter for money
...or if you are "poor", knowledge is free:
https://wiki.sa-mp.com/wiki/Scripting_Basics
Do not expect that someone would do these free, even if its 5min job
Wajttachu is offline   Reply With Quote
Old 27/01/2019, 07:30 PM   #4
Bolex_
Gangsta
 
Bolex_'s Avatar
 
Join Date: Aug 2015
Location: Croatia.
Posts: 586
Reputation: 124
Default Re: ColAndreas IsPlayerInWater problem

This might help you as well, https://github.com/Jelly23/IsPlayerTouchingWater
Bolex_ is offline   Reply With Quote
Old 27/01/2019, 07:59 PM   #5
SymonClash
Banned
 
Join Date: Dec 2018
Posts: 254
Reputation: 25
Default Re: ColAndreas IsPlayerInWater problem

pawn Code:
IsPlayerUsingSwimAnim(playerid)
{
    switch(GetPlayerAnimationIndex(playerid))
    {
        case 1538, 1542, 1540, 1544, 1250, 1062, 1539: return true;
    }
    return false;
}

pawn Code:
if(IsPlayerUsingSwimAnim(playerid))
{
    SendClientMessage(playerid, -1, "You're in water!");
}
else
{
    SendClientMessage(playerid, -1, "You aren't in water!");
}
SymonClash is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IsPlayerInWater bug HELP !! D3vin Scripting Help 7 08/05/2016 06:21 AM
Help Isplayerinwater KesaSport Scripting Help 4 05/06/2014 11:08 AM
IsPlayerInWater issue SuperViper Scripting Help 13 24/09/2013 06:01 PM
[Include] IsPlayerInWater stabker Includes 0 16/12/2012 06:36 PM
IsPlayerInWater SuB_ZeRo0_ Português/Portuguese 3 31/08/2011 10:23 PM


All times are GMT. The time now is 10:19 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.