IsPlayerInWater issue
#10

Use printf or SendClientMessageEx to see what the 'animlib' actually is when using this function. It could be empty and strcmp returns 0 for empty strings.

pawn Code:
stock IsPlayerInWater(playerid)
{
    new animlib[10], animname[10];
    GetAnimationName(GetPlayerAnimationIndex(playerid), animlib, sizeof(animlib), animname, sizeof(animname));
    printf("animlib: %s", animlib);
    return (!strcmp(animlib, "SWIM"));
}
Reply


Messages In This Thread
IsPlayerInWater issue - by SuperViper - 31.05.2012, 00:55
Re: IsPlayerInWater issue - by Ballu Miaa - 31.05.2012, 01:33
Re: IsPlayerInWater issue - by SuperViper - 31.05.2012, 01:42
Re: IsPlayerInWater issue - by MP2 - 31.05.2012, 01:43
Re: IsPlayerInWater issue - by jessejanssen - 31.05.2012, 01:49
Re: IsPlayerInWater issue - by Ballu Miaa - 31.05.2012, 02:04
Re: IsPlayerInWater issue - by SuperViper - 31.05.2012, 02:10
Re: IsPlayerInWater issue - by Azazelo - 31.05.2012, 02:53
Re: IsPlayerInWater issue - by SuperViper - 31.05.2012, 03:11
Re: IsPlayerInWater issue - by MadeMan - 31.05.2012, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)