14.08.2012, 01:52
this is my problem is when i do /odoor on an other houses for exemple i own the house ID 1 and i go to the pickup of the id 2 house and i do /odoor it open the door of my house Id 1 and i dont get this message that im not in the correct house to opens it : You have no Key's to unlock/Lock this door
Код:
if(strcmp(cmd, "/odoor", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(PlayerInfo[playerid][pDoorkey] == 1)
{
GameTextForPlayer(playerid, "~w~You have opened The door of your house", 5000, 6);
ApplyAnimationEx(playerid,"KISSING","gift_give",4.0,0,0,0,0,0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, " You have opened your door ");
return 1;
}
else if(PlayerInfo[playerid][pDoorkey] == 2)
{
GameTextForPlayer(playerid, "~w~You have opened The door of your house", 5000, 6);
ApplyAnimationEx(playerid,"KISSING","gift_give",4.0,0,0,0,0,0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, " You have opened your door ");
return 1;
}
else if(PlayerInfo[playerid][pDoorkey] == 3)
{
GameTextForPlayer(playerid, "~w~You have opened The door of your house", 5000, 6);
ApplyAnimationEx(playerid,"KISSING","gift_give",4.0,0,0,0,0,0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, " You have opened your door ");
return 1;
}
else if(PlayerInfo[playerid][pDoorkey] == 4)
{
GameTextForPlayer(playerid, "~w~You have opened The door of your house", 5000, 6);
ApplyAnimationEx(playerid,"KISSING","gift_give",4.0,0,0,0,0,0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, " You have opened your door ");
}
else if(PlayerInfo[playerid][pDoorkey] == 5)
{
GameTextForPlayer(playerid, "~w~You have opened The door of your house", 5000, 6);
ApplyAnimationEx(playerid,"KISSING","gift_give",4.0,0,0,0,0,0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, " You have opened your door ");
}
else if(PlayerInfo[playerid][pDoorkey] == 6)
{
GameTextForPlayer(playerid, "~w~You have opened The door of your house", 5000, 6);
ApplyAnimationEx(playerid,"KISSING","gift_give",4.0,0,0,0,0,0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, " You have opened your door ");
}
else if(PlayerInfo[playerid][pDoorkey] == 7)
{
GameTextForPlayer(playerid, "~w~You have opened The door of your house", 5000, 6);
ApplyAnimationEx(playerid,"KISSING","gift_give",4.0,0,0,0,0,0);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_YELLOW, " You have opened your door ");
}
else
{
GameTextForPlayer(playerid, "~r~You have no Key's to unlock/Lock this door", 5000, 6);
return 1;
}
}
}
}
return 1;
}

