20.02.2014, 19:02
I found the problem, I didn't return it. But.. now I have the problem of finding the right place for my return 1;.
This code spawns me at my house but it doesn't LoadPlayerSpawnData, send me that message or hide textdraws.
pawn Код:
if(PlayerInfo[playerid][pPlayerOwnsHouse] == 1)
{
new playername[24];
new string[64];
GetPlayerName(playerid, playername, sizeof(playername));
for(new idz = 1; idz < sizeof(HouseInfo); idz++)
{
if(HouseInfo[idz][hOwned] == 1 && strcmp(HouseInfo[idz][hOwner], playername) == 0)
{
SetPlayerPos(playerid, HouseInfo[idz][hEntranceX], HouseInfo[idz][hEntranceY], HouseInfo[idz][hEntranceZ]);
return 1;
}
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
SendClientMessage(playerid,COLOR_WHITE, string);
format(string,sizeof(string), "Welcome back to your home, %s.", GetName(playerid));
LoadPlayerSpawnData(playerid);
}
}