31.05.2012, 15:35
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"));
}