11.02.2015, 04:01
pawn Код:
dcmd_gotohouse(playerid, params[])
{
new h, file[HOUSEFILE_LENGTH];
if(sscanf(params, "d", h)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_CMD_USAGE_GOTOHOUSE);
format(file, sizeof(file), FILEPATH, h);
if(!dini_Exists(file)) return SendClientMessage(playerid, COLOUR_SYSTEM, E_INVALID_HID);
else
{
SetPlayerPosEx(playerid, dini_Float(file, "SpawnOutX"), dini_Float(file, "SpawnOutY"), dini_Float(file, "SpawnOutZ"), dini_Int(file, "SpawnInterior"), dini_Int(file, "SpawnWorld"));
SendMSG(playerid, COLOUR_YELLOW, 128, I_TELEPORT_MSG, h);
}
return 1;
}