25.09.2010, 02:28
(
Последний раз редактировалось [NWD]Jim._.Carrey; 29.08.2011 в 21:52.
Причина: [RESOLVIDO] Spwan House
)
Resolvido
forward SpawnPlayerAtHouse(playerid);
public SpawnPlayerAtHouse(playerid)
{
new str1[256],pname[24],str[256];
GetPlayerName(playerid, pname, sizeof(pname));
format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(pname));
if (dini_Exists(str1))
{
if(dini_Int(str1,"Houseid")!=-255)
{
new Float:x,Float:y,Float:z;
str = dini_Get(str1,"SpawnInt");
SetPlayerInterior(playerid, strval(str));
playerinterior[playerid] = strval(str);
x = dini_Float(str1,"SpawnX");
y = dini_Float(str1,"SpawnY");
z = dini_Float(str1,"SpawnZ");
SetPlayerPos(playerid, x, y, z);
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
SpawnPlayerAtHouse(playerid);
}