11.11.2014, 09:46
Hello, Im trying to make that it would check if the player name is same as the name in the talbe.
So I made this stock
then I made this if for deciding if he matches the name or not.
It doesnt work. can someone help me? it compiles but it doesnt work.
So I made this stock
Код:
stock pName(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
return Name;
}
Код:
if(strcmp(pName(playerid), iHos[haI][haOwner], true)==0)
{
new string1[128];
format(string, sizeof(string), "This house belongs to: %f", iHos[haI][haOwner]);
format(string, sizeof(string1), "And its locked!");
SendClientMessage(playerid, COLOR_RED, string);
SendClientMessage(playerid, COLOR_RED, string1);
}



The s missspelled, but, it doesnt check if the owner matches the name anyways.