if (strcmp("/hlock", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641)) // RW's house
{
SendClientMessage(playerid,RED,"You are not in the house's door!");
return 1;
}
if(PlayerData[playerid][OWNER] != 1)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 1)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
PlayerData[i][HLock] = 1;
}
return 1;
}
else if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1955.8412,-1115.7360,27.8305)) // Shot's house
{
SendClientMessage(playerid,RED,"You are not in the house's door!");
return 1;
}
if(PlayerData[playerid][OWNER] != 2)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 2)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
PlayerData[i][HLock] = 2;
}
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 1.0, 2091.0439,-1278.5629,26.1797)) // Lake B's house
{
SendClientMessage(playerid,RED,"You are not in the house's door!");
return 1;
}
if(PlayerData[playerid][OWNER] != 3)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 3)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
PlayerData[i][HLock] = 3;
}
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 1.0, 2153.9307,-1243.5135,25.3672)) // Jamsta's house
{
SendClientMessage(playerid,RED,"You are not in the house's door!");
return 1;
}
if(PlayerData[playerid][OWNER] != 4)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 4)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
PlayerData[i][HLock] = 4;
}
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 1.0, 2133.4910,-1232.1007,24.1563)) // Lil Hustlah's house
{
SendClientMessage(playerid,RED,"You are not in the house's door!");
return 1;
}
if(PlayerData[playerid][OWNER] != 5)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 5)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
PlayerData[i][HLock] = 5;
}
return 1;
}
}
if(strcmp("/hlock", cmdtext, true, 10) == 0)
{
if(PlayerData[playerid][OWNER] != 1)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 1)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerData[i][HLock] = 1;
}
return 1;
}
}
if(PlayerData[playerid][OWNER] != 2)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 2)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerData[i][HLock] = 2;
}
return 1;
}
}
if(PlayerData[playerid][OWNER] != 3)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 3)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerData[i][HLock] = 3;
}
return 1;
}
}
if(PlayerData[playerid][OWNER] != 4)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 4)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerData[i][HLock] = 4;
}
return 1;
}
}
if(PlayerData[playerid][OWNER] != 5)
{
SendClientMessage(playerid,RED,"You don't own this house!");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641))
{
if(PlayerData[playerid][OWNER] == 5)
{
SendClientMessage(playerid,RED,"The house has been locked.");
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerData[i][HLock] = 5;
}
return 1;
}
}
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 1.0, 1906.2339,-1113.1035,26.6641)) // RW's house
pawn Код:
|