Posts: 13
Threads: 4
Joined: Dec 2013
Reputation:
0
I start a new house system, all it's okay but when i try to lock my own house, doesn't work..
Code:
if(strcmp(HouseInfo[i][HouseOwnerName], name, true) == 1)
{
Posts: 1,311
Threads: 11
Joined: Mar 2015
Reputation:
0
Hello.
We need more code. Show us your command which you use to lock your house.
Posts: 13
Threads: 4
Joined: Dec 2013
Reputation:
0
if(strcmp(cmdtext, "/lockhouse", true) == 0)
{
for(new i = 0; i <sizeof(HouseInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][HouseExitX], HouseInfo[i][HouseExitY], HouseInfo[i][HouseExitZ]) || IsPlayerInRangeOfPoint(playerid, 1.0, HouseInfo[i][HouseEnterX], HouseInfo[i][HouseEnterY], HouseInfo[i][HouseEnterZ]))
{
new name[255];
GetPlayerName(playerid, name, sizeof(name));
if(strcmp(HouseInfo[i][HouseOwnerName], name, true) == 1)
{
if(HouseInfo[i][HouseLocked] == 0)
{
HouseInfo[i][HouseLocked] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: {FFFFFF}Къщата вече е заключена за посетители!");
}
else if(HouseInfo[i][HouseLocked] == 1)
{
HouseInfo[i][HouseLocked] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "SERVER: {FFFFFF}Къщата вече е отключена за посетители!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Трябва да сте собственик на къщата!");
}
}
}
return 1;
}
Posts: 13
Threads: 4
Joined: Dec 2013
Reputation:
0
Not working, i can unlock all houses without to be my.
Posts: 276
Threads: 17
Joined: Dec 2015
Reputation:
0
Are you sure about this? Try to paste the code again and try.