26.09.2011, 04:53
pawn Код:
if (PRESSED(KEY_SECONDARY_ATTACK))
{
new Name[255];
GetPlayerName(playerid, Name, sizeof(Name));
for(new houseid = 1; houseid < sizeof(HouseInfo); houseid++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ]))
{
if(HouseInfo[houseid][hOwned] == 1)
{
if(!strcmp(Name, HouseInfo[houseid][hOwner], false, strlen(Name)))
{
SetPlayerInterior(playerid, HouseInfo[houseid][hInterior]);
SetPlayerPos(playerid, HouseInfo[houseid][hExitX], HouseInfo[houseid][hExitY], HouseInfo[houseid][hExitZ]);
}
}
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, HouseInfo[houseid][hExitX], HouseInfo[houseid][hExitY], HouseInfo[houseid][hExitZ]))
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HouseInfo[houseid][hEnterX], HouseInfo[houseid][hEnterY], HouseInfo[houseid][hEnterZ]);
}
}
}
return 1;
}
please someone help me
thank you in advance