Comparing 2 strings using strcmp.
#1

Hello!

So I've been working on my house system and I am at my final touches. Basically my system works through names, it saves the names to the house and that's how it recognizes if its the owner or not. I am trying to make a lock house command but the problem is that I am not sure how to compare both strings, I've already tried several tutorials and wiki but none of them really help.

Код:
if(HouseInfo[i][HOwner] == !strcmp(HouseInfo[i][HOwner], PlayerName(playerid), false))
The HOwner variable is already a string with the owner's name stored in it. But I just can't figure out how to compare it to the player's name who's performing the command. [obviously starting from !strcmp is wrong].

Could anyone show me the correct formula please? Plus some explanation would be greatly appreciated.

Thanks!
Reply


Messages In This Thread
Comparing 2 strings using strcmp. - by Black Axe - 20.01.2016, 07:18
Re: Comparing 2 strings using strcmp. - by SickAttack - 20.01.2016, 07:24
Re: Comparing 2 strings using strcmp. - by Black Axe - 20.01.2016, 07:26

Forum Jump:


Users browsing this thread: 3 Guest(s)